Skip to content

Commit a3e5955

Browse files
authored
correct version and package details (#101)
* correct version and package details
1 parent fd449a1 commit a3e5955

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

netbox_acls/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@
44

55
from extras.plugins import PluginConfig
66

7+
from .version import __version__
8+
9+
10+
class NetBoxACLsConfig(PluginConfig):
11+
"""
12+
Plugin specifc configuration
13+
"""
714

8-
class NetBoxAccessListsConfig(PluginConfig):
915
name = "netbox_acls"
1016
verbose_name = "Access Lists"
17+
version = __version__
1118
description = "Manage simple ACLs in NetBox"
12-
version = "1.0.0"
1319
base_url = "access-lists"
20+
min_version = "3.3.0"
21+
max_version = "3.3.99"
22+
# default_settings = {}
1423

1524

16-
config = NetBoxAccessListsConfig
25+
config = NetBoxACLsConfig

netbox_acls/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.0"
1+
__version__ = "1.1.0"

setup.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from setuptools import find_packages, setup
55

6-
with open("README.md") as fh:
6+
with open("README.md", "r", encoding="utf-8") as fh:
77
long_description = fh.read()
88

99

@@ -13,10 +13,17 @@ def read(rel_path):
1313
return fp.read()
1414

1515

16+
def get_version(rel_path):
17+
for line in read(rel_path).splitlines():
18+
if not line.startswith("__version__"):
19+
raise RuntimeError("Unable to find version string.")
20+
delim = '"' if '"' in line else "'"
21+
return line.split(delim)[1]
22+
23+
1624
setup(
1725
name="netbox-acls",
18-
version="1.1.0",
19-
# version=get_version("netbox_acls/version.py"),
26+
version=get_version("netbox_acls/version.py"),
2027
description="A NetBox plugin for Access List management",
2128
long_description=long_description,
2229
long_description_content_type="text/markdown",
@@ -25,4 +32,8 @@ def read(rel_path):
2532
packages=find_packages(),
2633
include_package_data=True,
2734
zip_safe=False,
35+
classifiers=[
36+
"Framework :: Django",
37+
"Programming Language :: Python :: 3",
38+
],
2839
)

0 commit comments

Comments
 (0)