Skip to content

Commit

Permalink
Switch from setup.py to setup.cfg
Browse files Browse the repository at this point in the history
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]: pypa/setuptools#1136
  [pr]: pypa/setuptools#1180

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
  • Loading branch information
c00kiemon5ter committed Jul 3, 2018
1 parent be90cc0 commit 9c7b001
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 71 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.5.0
102 changes: 102 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[metadata]
name = pysaml2
version = file:VERSION
author = IdentityPython
author-email = discuss@idpy.org
maintainer = IdentityPython
maintainer-email = discuss@idpy.org
license = Apache License Version 2.0
license-file = LICENSE
description = Python implementation of SAML Version 2 Standard
long-description = file:README.rst
long_description_content_type = text/x-rst; charset=UTF-8
home-page = https://idpy.org
project_urls =
Bug Tracker = https://github.com/IdentityPython/pysaml2/issues
Documentation = https://pysaml2.readthedocs.io
Source Code = https://github.com/IdentityPython/pysaml2
classifier =
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
requires-dist = setuptools
keywords =
saml
saml2
standard
federation
idpy
IdentityPython


[options]
zip_safe = False
include_package_data = True
package_dir =
= src
packages = find:
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


[options.packages.find]
where = src
include =
saml2
saml2.*


[options.package_data]
* =
*.xml


[options.extras_require]
s2repoze =
paste
zope.interface
repoze.who


[bdist_wheel]
universal = 1


[flake8]
author-attribute = forbidden
no-accept-encodings = True
assertive-snakecase = True
# assertive-test-pattern = <fnmatch>
inline-quotes = '
multiline-quotes = '''
docstring-quotes = """
application-import-names = saml2
hang_closing = false
doctests = false
max-complexity = 10
exclude =
.git
__pycache__
docs/source/conf.py
build
dist
77 changes: 6 additions & 71 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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'},
)

0 comments on commit 9c7b001

Please sign in to comment.