|
| 1 | +"""setup.py for docklib""" |
| 2 | + |
| 3 | +import pathlib |
| 4 | + |
| 5 | +from setuptools import setup |
| 6 | + |
| 7 | +# The directory containing this file |
| 8 | +HERE = pathlib.Path(__file__).parent |
| 9 | + |
| 10 | +# The text of the README file |
| 11 | +README = (HERE / "README.md").read_text() |
| 12 | + |
| 13 | + |
| 14 | +def get_version(rel_path): |
| 15 | + """Given a path to a Python init file, return the version string.""" |
| 16 | + with open(rel_path, "r") as openfile: |
| 17 | + lines = openfile.readlines() |
| 18 | + for line in lines: |
| 19 | + if line.startswith("__version__"): |
| 20 | + delim = '"' if '"' in line else "'" |
| 21 | + return line.split(delim)[1] |
| 22 | + raise RuntimeError("Unable to find version string.") |
| 23 | + |
| 24 | + |
| 25 | +setup( |
| 26 | + name="docklib", |
| 27 | + version=get_version("docklib/__init__.py"), |
| 28 | + description=( |
| 29 | + "Python module intended to assist IT " |
| 30 | + "administrators with manipulation of the macOS Dock." |
| 31 | + ), |
| 32 | + long_description=README, |
| 33 | + long_description_content_type="text/markdown", |
| 34 | + url="https://github.com/homebysix/docklib", |
| 35 | + author="Elliot Jordan", |
| 36 | + |
| 37 | + license="Apache 2.0", |
| 38 | + classifiers=[ |
| 39 | + "Development Status :: 5 - Production/Stable", |
| 40 | + "Environment :: MacOS X", |
| 41 | + "Intended Audience :: Information Technology", |
| 42 | + "Intended Audience :: System Administrators", |
| 43 | + "License :: OSI Approved :: Apache Software License", |
| 44 | + "Programming Language :: Python :: 2", |
| 45 | + "Programming Language :: Python :: 3", |
| 46 | + "Topic :: System :: Systems Administration", |
| 47 | + "Topic :: Utilities", |
| 48 | + ], |
| 49 | + packages=["docklib"], |
| 50 | + include_package_data=True, |
| 51 | +) |
0 commit comments