From a2d3cfd96ca241365da9834a8d324e6d7687711c Mon Sep 17 00:00:00 2001 From: Alexander Maul Date: Tue, 4 Dec 2018 12:27:05 +0100 Subject: [PATCH 1/3] Change setup, so PyPi recognizes Python requirements. --- setup.py | 77 ++++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 47 deletions(-) diff --git a/setup.py b/setup.py index fb40286..1164195 100644 --- a/setup.py +++ b/setup.py @@ -31,51 +31,34 @@ requires = ["bitstring", "six"] -if sys.version_info >= (3, 0): - setup(name="trollbufr", - version=version.version, - description="Reading meteorological data format BUFR in pure Python", - author="Alexander Maul", - author_email="alexander.maul@dwd.de", - classifiers=["Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v3 " + - "or later (LGPLv3+)", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Topic :: Scientific/Engineering" - ], - test_suite="bufr.tests.suite", - entry_points={ - "console_scripts": ["trollbufr3 = trollbufr.bufr_main:run", - "trollbufr3_update = trollbufr.update:run"]}, - packages=["trollbufr", "trollbufr.coder"], - install_requires=requires, - python_requires=">=3.4", - zip_safe=False, - ) +if sys.version_info < (3, 0): + scripts_with_python_version = ["trollbufr = trollbufr.bufr_main:run", + "trollbufr_update = trollbufr.update:run"] else: - setup(name="trollbufr", - version=version.version, - description="Reading meteorological data format BUFR in pure Python", - author="Alexander Maul", - author_email="alexander.maul@dwd.de", - classifiers=["Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v3 " + - "or later (LGPLv3+)", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Topic :: Scientific/Engineering" - ], - test_suite="bufr.tests.suite", - entry_points={ - "console_scripts": ["trollbufr = trollbufr.bufr_main:run", - "trollbufr_update = trollbufr.update:run"]}, - packages=["trollbufr", "trollbufr.coder"], - install_requires=requires, - python_requires=">=2.6, <3", - zip_safe=False, - ) + scripts_with_python_version = ["trollbufr3 = trollbufr.bufr_main:run", + "trollbufr3_update = trollbufr.update:run"] + +setup(name="trollbufr", + version=version.version, + description="Reading meteorological data format BUFR in pure Python", + author="Alexander Maul", + author_email="alexander.maul@dwd.de", + classifiers=["Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU Lesser General Public License v3 " + + "or later (LGPLv3+)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Topic :: Scientific/Engineering" + ], + test_suite="bufr.tests.suite", + entry_points={ + "console_scripts": scripts_with_python_version}, + packages=["trollbufr", "trollbufr.coder"], + install_requires=requires, + python_requires="2.6, 2.7, >=3.4", + zip_safe=False, + ) From ae968d75749beed233cbea8b242bce66e585b9ef Mon Sep 17 00:00:00 2001 From: Alexander Maul Date: Tue, 4 Dec 2018 12:38:02 +0100 Subject: [PATCH 2/3] Bump-up version to 0.10.2 . --- trollbufr/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trollbufr/version.py b/trollbufr/version.py index d4a96ab..b6413fc 100644 --- a/trollbufr/version.py +++ b/trollbufr/version.py @@ -26,6 +26,6 @@ __major__ = "0" __minor__ = "10" -__patch__ = "1" +__patch__ = "2" version = ".".join([__major__, __minor__, __patch__]) From 1d0b02c842bc94cbaaa3bd8d53502df6d31ff144 Mon Sep 17 00:00:00 2001 From: Alexander Maul Date: Tue, 4 Dec 2018 12:49:27 +0100 Subject: [PATCH 3/3] Fix requires in setup. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c2c0aa2..e8eb85d 100644 --- a/setup.py +++ b/setup.py @@ -59,6 +59,6 @@ "console_scripts": scripts_with_python_version}, packages=["trollbufr", "trollbufr.coder"], install_requires=requires, - python_requires="==2.6, ==2.7, >=3.4", + python_requires=">=2.6", zip_safe=False, )