summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2018-07-02 15:47:58 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2018-07-03 04:21:03 +0300
commit9c7b0014ccc4229031813ddcc5f6790b59540df5 (patch)
tree60db639ec429806df6a0742dfc9dc4acf7e9d0c8 /setup.py
parentbe90cc09d9bb2cb8739aaee9565fa50af68ac676 (diff)
downloadpysaml2-9c7b0014ccc4229031813ddcc5f6790b59540df5.tar.gz
Switch from setup.py to setup.cfg
A bug is blocking setuptools from working with python2 [bug]. Work is on its way [pr]. Until that is fixed, package_dir should be defined in setup.py to preserve compatibility of the native str type. [bug]: https://github.com/pypa/setuptools/issues/1136 [pr]: https://github.com/pypa/setuptools/pull/1180 Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py77
1 files changed, 6 insertions, 71 deletions
diff --git a/setup.py b/setup.py
index 7d386505..996b404f 100755
--- a/setup.py
+++ b/setup.py
@@ -1,78 +1,13 @@
-"""Setup.py entry point for package."""
+"""Setup.py entry point for package.
-import re
+Configuration is handled by setuptools>30.3.0 through setup.cfg.
+https://setuptools.readthedocs.io/en/latest/setuptools.html#metadata
+https://setuptools.readthedocs.io/en/latest/setuptools.html#options
+"""
import setuptools
-version = ''
-VERSION_REGEX = r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]'
-with open('src/saml2/__init__.py', 'r') as fd:
- content = fd.read()
- version = re.search(VERSION_REGEX, content, re.MULTILINE).group(1)
-
setuptools.setup(
- name='pysaml2',
- version=version,
- description='Python implementation of SAML Version 2 Standard',
- license='Apache 2.0',
- url='https://github.com/IdentityPython/pysaml2',
- packages=[
- 'saml2',
- 'saml2/attributemaps',
- 'saml2/authn_context',
- 'saml2/entity_category',
- 'saml2/extension',
- 'saml2/profile',
- 'saml2/s2repoze',
- 'saml2/s2repoze.plugins',
- 'saml2/schema',
- 'saml2/userinfo',
- 'saml2/ws',
- 'saml2/xmldsig',
- 'saml2/xmlenc',
- ],
- package_dir={
- '': 'src',
- },
- package_data={
- '': [
- 'xml/*.xml',
- ],
- },
- classifiers=[
- 'Development Status :: 4 - Beta',
- 'License :: OSI Approved :: Apache Software License',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- ],
- scripts=[
- 'tools/make_metadata.py',
- 'tools/mdexport.py',
- 'tools/merge_metadata.py',
- 'tools/parse_xsd2.py',
- ],
- install_requires=[
- 'cryptography',
- 'defusedxml',
- 'future', 'pyOpenSSL',
- 'python-dateutil',
- 'pytz',
- 'requests >= 1.0.0',
- 'six',
- ],
- extras_require={
- 's2repoze': [
- 'paste',
- 'zope.interface',
- 'repoze.who',
- ],
- },
- zip_safe=False,
+ package_dir={'': 'src'},
)