From 683a94fb80e2747199e2ea9476dba296e8dcaacd Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 24 May 2017 10:01:24 -0700 Subject: [PATCH] apply platform tag to wheels --- setup.cfg | 2 ++ setup.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..d7de2b16 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[wheel] +universal=1 \ No newline at end of file diff --git a/setup.py b/setup.py index f9cf59a3..88341718 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,24 @@ if sys.platform in checksums: else: print("I don't know how to bundle s2i for %s" % sys.platform) +cmdclass = {} +try: + from wheel.bdist_wheel import bdist_wheel + from wheel.pep425tags import get_platform +except ImportError: + # no wheel + pass +else: + # apply current platform tag + # because we bundle platform-specific s2i binaries + class PlatformBDistWheel(bdist_wheel): + def initialize_options(self): + super(PlatformBDistWheel, self).initialize_options() + if self.plat_name is None: + self.plat_name = get_platform() + + cmdclass['bdist_wheel'] = PlatformBDistWheel + setup( name='jupyter-repo2docker', version='0.1', @@ -84,6 +102,7 @@ setup( author='Yuvi Panda', author_email='yuvipanda@gmail.com', license='BSD', + cmdclass=cmdclass, package_data={ 'repo2docker': ['s2i'], },