|
| 1 | +#!/usr/bin/env python3 |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | + |
| 4 | +import io |
| 5 | +import os |
| 6 | + |
| 7 | +from setuptools import setup, find_packages |
| 8 | + |
| 9 | +# Package meta-data. |
| 10 | +NAME = 'dbus_next' |
| 11 | +DESCRIPTION = 'A zero-dependency DBus library for Python with asyncio support' |
| 12 | +URL = 'https://github.com/acrisci/python-dbus-next' |
| 13 | + |
| 14 | +AUTHOR = 'Tony Crisci' |
| 15 | +REQUIRES_PYTHON = '>=3.6.0' |
| 16 | +VERSION = '0.0.1' |
| 17 | + |
| 18 | +# What packages are required for this module to be executed? |
| 19 | +REQUIRED = [] |
| 20 | + |
| 21 | +# What packages are optional? |
| 22 | +EXTRAS = {} |
| 23 | + |
| 24 | +# The rest you shouldn't have to touch too much :) |
| 25 | +# ------------------------------------------------ |
| 26 | +# Except, perhaps the License and Trove Classifiers! |
| 27 | +# If you do change the License, remember to change the Trove Classifier for that! |
| 28 | + |
| 29 | +here = os.path.abspath(os.path.dirname(__file__)) |
| 30 | + |
| 31 | +# Import the README and use it as the long-description. |
| 32 | +# Note: this will only work if 'README.md' is present in your MANIFEST.in file! |
| 33 | +try: |
| 34 | + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
| 35 | + long_description = '\n' + f.read() |
| 36 | +except FileNotFoundError: |
| 37 | + long_description = DESCRIPTION |
| 38 | + |
| 39 | +# Load the package's __version__.py module as a dictionary. |
| 40 | +about = {} |
| 41 | +if not VERSION: |
| 42 | + project_slug = NAME.lower().replace('-', '_').replace(' ', '_') |
| 43 | + with open(os.path.join(here, project_slug, '__version__.py')) as f: |
| 44 | + exec(f.read(), about) |
| 45 | +else: |
| 46 | + about['__version__'] = VERSION |
| 47 | + |
| 48 | + |
| 49 | +# Where the magic happens: |
| 50 | +setup( |
| 51 | + name=NAME, |
| 52 | + version=about['__version__'], |
| 53 | + description=DESCRIPTION, |
| 54 | + long_description=long_description, |
| 55 | + long_description_content_type='text/markdown', |
| 56 | + author=AUTHOR, |
| 57 | + author_email=EMAIL, |
| 58 | + python_requires=REQUIRES_PYTHON, |
| 59 | + url=URL, |
| 60 | + packages=find_packages(exclude=['test', '*.test', '*.test.*', 'test.*']), |
| 61 | + install_requires=REQUIRED, |
| 62 | + extras_require=EXTRAS, |
| 63 | + include_package_data=True, |
| 64 | + license='MIT', |
| 65 | + classifiers=[ |
| 66 | + # Trove classifiers |
| 67 | + # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers |
| 68 | + 'Development Status :: 3 - Alpha', |
| 69 | + 'Environment :: X11 Applications', |
| 70 | + 'Environment :: X11 Applications :: Gnome', |
| 71 | + 'Topic :: Desktop Environment :: Gnome', |
| 72 | + 'Topic :: Software Development :: Embedded Systems', |
| 73 | + 'Framework :: AsyncIO', |
| 74 | + 'License :: OSI Approved :: MIT License', |
| 75 | + 'Programming Language :: Python', |
| 76 | + 'Programming Language :: Python :: 3', |
| 77 | + 'Programming Language :: Python :: 3.6', |
| 78 | + 'Programming Language :: Python :: 3.7', |
| 79 | + 'Programming Language :: Python :: Implementation :: CPython', |
| 80 | + 'Programming Language :: Python :: Implementation :: PyPy' |
| 81 | + ] |
| 82 | +) |
0 commit comments