From 45e0bcadb08c2146ef5b3cbba754e634231cba75 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Mon, 15 Apr 2019 12:16:37 +0100 Subject: [PATCH 1/2] distribute universal wheels --- Makefile | 4 ++-- setup.cfg | 2 ++ setup.py | 65 +++++++++++++++++++++++++++---------------------------- 3 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 setup.cfg diff --git a/Makefile b/Makefile index c5ab19b..1d6563d 100644 --- a/Makefile +++ b/Makefile @@ -19,10 +19,10 @@ help: @echo " push - 'git push' to all hosted repositories" release: clean test upload-doc - python setup.py sdist upload + python setup.py sdist bdist_wheel upload dist: clean - python setup.py sdist + python setup.py sdist bdist_wheel build: doc @bin/python setup.py build diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index d49b44b..08513bf 100755 --- a/setup.py +++ b/setup.py @@ -45,42 +45,41 @@ def pycrypto_complain(version): pycrypto_complain(None) -install_requires = [ +setup( + name="mom", + version="0.1.3", + license="Apache Software License 2.0", + url="https://github.com/gorakhargosh/mom", + description="Python utility library.", + long_description=__doc__, + author="Yesudeep Mangalapilly", + author_email="yesudeep@google.com", + zip_safe=True, + platforms="any", + packages=["mom"], + include_package_data=True, + install_requires=[ + "pyasn1 >= 0.1.1", + 'simplejson; python_version<"2.7"', + ], # Binary dependency. Allow the user to decide whether she wants to pull this # in or not. For example, App Engine provides its own version of PyCrypto # which is written in pure Python. Forcing this dependency will cause # compatibility problems on that platform. #"PyCrypto >=2.0.1", + extras_require={ + "crypto": ["PyCrypo>=2.0.1"], + }, + keywords=' '.join([ + "python", + "utilities", + ]), + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", ] -if sys.version_info < (3, 0, 0): - install_requires.append("pyasn1 >=0.0.13b") -if sys.version_info < (2, 6, 0): - install_requires.append("simplejson >=2.1.3") - - -setup(name="mom", - version="0.1.3", - license="Apache Software License 2.0", - url="http://github.com/gorakhargosh/mom", - description="Python utility library.", - long_description=__doc__, - author="Yesudeep Mangalapilly", - author_email="yesudeep@google.com", - zip_safe=True, - platforms="any", - packages=["mom"], - include_package_data=True, - install_requires=install_requires, - keywords=' '.join([ - "python", - "utilities", - ]), - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Software Development :: Libraries :: Python Modules", - ] - ) +) From 1ce25a357de7094da993476b7bd741efa07f929e Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Mon, 15 Apr 2019 12:18:01 +0100 Subject: [PATCH 2/2] pyasn1 has been ported to python3 --- README | 2 -- 1 file changed, 2 deletions(-) diff --git a/README b/README index 46ee65b..61dc1ce 100644 --- a/README +++ b/README @@ -4,7 +4,5 @@ Every time you copy-and-paste code into a utils.py God kills a Unicorn. Please do not repeat yourself. Evolve this library instead. The library works with Python 2.5+, PyPy, and Python 3.x. -The RSA cryptography modules depend on pyasn1, which has not -been ported to Python 3.x, so this is pending. Please visit: http://gorakhargosh.github.com/mom/ for more information.