Skip to content

Commit

Permalink
Copy setup.py format from netbox-bgp
Browse files Browse the repository at this point in the history
  • Loading branch information
natm authored Oct 31, 2023
1 parent 9baad4e commit f89210d
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
import codecs
import os.path

from setuptools import find_packages, setup


with open("README.md", "r") as fh:
long_description = fh.read()


def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()


def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")


setup(
name="netbox-floorplan-plugin",
version="0.1.1",
version=get_version('netbox_floorplan/version.py'),
author="Tony Nealon",
author_email="[email protected]",
description="Netbox Plugin to support graphical floorplans",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/netboxlabs/netbox-floorplan-plugin.git",
license="LGPLv3+",
install_requires=[],
Expand Down

0 comments on commit f89210d

Please sign in to comment.