[Python-modules-commits] [python-social-auth] 248/322: Fix wheel support. Refs #588
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:13:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.10
in repository python-social-auth.
commit fe76417d1b3b990539e0dc634f2585f34ce2d4f3
Author: Matías Aguirre <matiasaguirre at gmail.com>
Date: Mon Apr 13 01:55:05 2015 -0300
Fix wheel support. Refs #588
---
Makefile | 15 ++++++++++---
setup.cfg | 3 ---
setup.py | 72 +++++++++++++++++++++++++++++++++++----------------------------
3 files changed, 52 insertions(+), 38 deletions(-)
diff --git a/Makefile b/Makefile
index f641f88..b623b4e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,17 @@ docs:
site: docs
rsync -avkz site/ tarf:sites/psa/
-publish:
- python setup.py sdist bdist_wheel
- twine upload dist/*
+build:
+ python setup.py sdist
+ python setup.py bdist_wheel --python-tag py2
+ BUILD_VERSION=3 python setup.py bdist_wheel --python-tag py3
+
+publish: build
+ python setup.py upload
+
+clean:
+ find . -name '*.py[co]' -delete
+ find . -name '__pycache__' -delete
+ rm -rf python_social_auth.egg-info dist build
.PHONY: site docs publish
diff --git a/setup.cfg b/setup.cfg
index f345d26..365848c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -9,6 +9,3 @@ with-coverage=1
cover-erase=1
cover-package=social
rednose=1
-
-[wheel]
-universal = 1
diff --git a/setup.py b/setup.py
index 7f85767..c99f3b4 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from os.path import join, dirname, split
from setuptools import setup
-PY3 = sys.version_info[0] == 3
+PY3 = os.environ.get('BUILD_VERSION') == '3' or sys.version_info[0] == 3
version = __import__('social').__version__
@@ -46,34 +46,42 @@ def get_packages():
return packages
-requires = ['requests>=1.1.0', 'oauthlib>=0.3.8', 'six>=1.2.0', 'PyJWT>=1.0.0']
-if PY3:
- requires += ['python3-openid>=3.0.1', 'requests-oauthlib>0.3.2']
-else:
- requires += ['python-openid>=2.2', 'requests-oauthlib>=0.3.1']
-
-
-setup(name='python-social-auth',
- version=version,
- author='Matias Aguirre',
- author_email='matiasaguirre at gmail.com',
- description='Python social authentication made simple.',
- license='BSD',
- keywords='django, flask, pyramid, webpy, openid, oauth, social auth',
- url='https://github.com/omab/python-social-auth',
- packages=get_packages(),
- # package_data={'social': ['locale/*/LC_MESSAGES/*']},
- long_description=long_description(),
- install_requires=requires,
- classifiers=['Development Status :: 4 - Beta',
- 'Topic :: Internet',
- 'License :: OSI Approved :: BSD License',
- 'Intended Audience :: Developers',
- 'Environment :: Web Environment',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3'],
- tests_require=['sure>=1.2.5', 'httpretty>=0.8.0', 'mock>=1.0.1'],
- test_suite='social.tests',
- zip_safe=False)
+requirements_file, tests_requirements_file = {
+ False: ('requirements.txt', 'social/tests/requirements.txt'),
+ True: ('requirements-python3.txt', 'social/tests/requirements-python3.txt')
+}[PY3]
+
+with open(requirements_file, 'r') as f:
+ requirements = f.readlines()
+
+with open(tests_requirements_file, 'r') as f:
+ tests_requirements = f.readlines()
+
+setup(
+ name='python-social-auth',
+ version=version,
+ author='Matias Aguirre',
+ author_email='matiasaguirre at gmail.com',
+ description='Python social authentication made simple.',
+ license='BSD',
+ keywords='django, flask, pyramid, webpy, openid, oauth, social auth',
+ url='https://github.com/omab/python-social-auth',
+ packages=get_packages(),
+ # package_data={'social': ['locale/*/LC_MESSAGES/*']},
+ long_description=long_description(),
+ install_requires=requirements,
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Topic :: Internet',
+ 'License :: OSI Approved :: BSD License',
+ 'Intended Audience :: Developers',
+ 'Environment :: Web Environment',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3'
+ ],
+ tests_require=tests_requirements,
+ test_suite='social.tests',
+ zip_safe=False
+)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list