Mercurial > hgrepos > Python > libs > ConfigMix
comparison setup.py @ 0:53ea2bc254e7
Begin a package to abstract some of the important configuration handling stuff.
- My first package with a "setup.py" installer.
BUGS:
- licensing
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Mon, 07 Mar 2016 09:03:18 +0100 |
| parents | |
| children | f76d85ccc5b9 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:53ea2bc254e7 |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 # -*- coding: utf-8 -*- | |
| 3 | |
| 4 import re | |
| 5 import os | |
| 6 import sys | |
| 7 try: | |
| 8 from setuptools import setup | |
| 9 except ImportError: | |
| 10 from distutils.core import setup | |
| 11 | |
| 12 | |
| 13 if (sys.version_info[0] < 2) or \ | |
| 14 ((sys.version_info[0] == 2) and (sys.version_info[1] < 6)): | |
| 15 raise ValueError("Need at least Python 2.6") | |
| 16 | |
| 17 | |
| 18 pkg_root = os.path.dirname(__file__) | |
| 19 | |
| 20 _version_re = re.compile(br"^\s*__version__\s*=\s*(\"|')(.*)\1\s*(#.*)?$", | |
| 21 re.MULTILINE) | |
| 22 | |
| 23 with open(os.path.join(pkg_root, "mixconfig", "__init__.py"), "rb") as vf: | |
| 24 version = _version_re.search(vf.read()).group(2).decode("utf-8") | |
| 25 | |
| 26 with open(os.path.join(pkg_root, "README"), "rt") as rf: | |
| 27 long_description = rf.read() | |
| 28 | |
| 29 setup( | |
| 30 name="MixConfig", | |
| 31 version=version, | |
| 32 author="Franz Glasner", | |
| 33 # license='BSD', | |
| 34 url="https://pypi.dom66.de/simple/mixconfig/", | |
| 35 description="Library for extended configuration files", | |
| 36 long_description=long_description, | |
| 37 packages=["mixconfig"], | |
| 38 include_package_data=False, | |
| 39 zip_safe=True, | |
| 40 platforms="any", | |
| 41 classifiers=[ | |
| 42 "Development Status :: 5 - Production/Stable", | |
| 43 "Environment :: Console", | |
| 44 "Intended Audience :: Developers", | |
| 45 # 'License :: OSI Approved :: BSD License', | |
| 46 "Operating System :: OS Independent", | |
| 47 "Programming Language :: Python", | |
| 48 "Programming Language :: Python :: 2", | |
| 49 "Programming Language :: Python :: 2.6", | |
| 50 "Programming Language :: Python :: 2.7", | |
| 51 "Programming Language :: Python :: 3", | |
| 52 "Programming Language :: Python :: 3.0", | |
| 53 "Programming Language :: Python :: 3.1", | |
| 54 "Programming Language :: Python :: 3.2", | |
| 55 "Programming Language :: Python :: 3.3", | |
| 56 "Programming Language :: Python :: 3.4", | |
| 57 "Programming Language :: Python :: 3.5", | |
| 58 "Topic :: Software Development :: Libraries :: Python Modules" | |
| 59 ], | |
| 60 install_requires = ["PyYAML>=3.0"], | |
| 61 ) |
