| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent df0574d commit 93968d2
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,7 @@ | |||
| 19 | 19 | - Callum Noble ([@callumnoble](https://github.com/callumnoble)) | |
| 20 | 20 | - Christian Heimes ([@tiran](https://github.com/tiran)) | |
| 21 | 21 | - Christoph Gohlke ([@cgohlke](https://github.com/cgohlke)) | |
| 22 | + - Christopher Bremner ([@chrisjbremner](https://github.com/chrisjbremner)) | ||
| 22 | 23 | - Christopher Pow ([@christopherpow](https://github.com/christopherpow)) | |
| 23 | 24 | - Daniel Fernandez ([@fdanny](https://github.com/fdanny)) | |
| 24 | 25 | - Daniel Santana ([@dgsantana](https://github.com/dgsantana)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ This document follows the conventions laid out in [Keep a CHANGELOG][]. | |||
| 14 | 14 | ### Changed | |
| 15 | 15 | ||
| 16 | 16 | - Added argument types information to "No method matches given arguments" message | |
| 17 | + - Moved wheel import in setup.py inside of a try/except to prevent pip collection failures | ||
| 17 | 18 | ||
| 18 | 19 | ### Fixed | |
| 19 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,10 +15,14 @@ | |||
| 15 | 15 | import sysconfig | |
| 16 | 16 | from distutils import spawn | |
| 17 | 17 | from distutils.command import install, build, build_ext, install_data, install_lib | |
| 18 | - from wheel import bdist_wheel | ||
| 19 | 18 | ||
| 20 | 19 | from setuptools import Extension, setup | |
| 21 | 20 | ||
| 21 | + try: | ||
| 22 | + from wheel import bdist_wheel | ||
| 23 | + except ImportError: | ||
| 24 | + bdist_wheel = None | ||
| 25 | + | ||
| 22 | 26 | # Allow config/verbosity to be set from cli | |
| 23 | 27 | # http://stackoverflow.com/a/4792601/5208670 | |
| 24 | 28 | CONFIG = "Release" # Release or Debug | |
@@ -594,21 +598,21 @@ def run(self): | |||
| 594 | 598 | _update_xlat_devtools() | |
| 595 | 599 | return install.install.run(self) | |
| 596 | 600 | ||
| 601 | + if bdist_wheel: | ||
| 602 | + class BDistWheelPythonnet(bdist_wheel.bdist_wheel): | ||
| 603 | + user_options = bdist_wheel.bdist_wheel.user_options + [("xplat", None, None)] | ||
| 597 | 604 | ||
| 598 | - class BDistWheelPythonnet(bdist_wheel.bdist_wheel): | ||
| 599 | - user_options = bdist_wheel.bdist_wheel.user_options + [("xplat", None, None)] | ||
| 605 | + def initialize_options(self): | ||
| 606 | + bdist_wheel.bdist_wheel.initialize_options(self) | ||
| 607 | + self.xplat = None | ||
| 600 | 608 | ||
| 601 | - def initialize_options(self): | ||
| 602 | - bdist_wheel.bdist_wheel.initialize_options(self) | ||
| 603 | - self.xplat = None | ||
| 609 | + def finalize_options(self): | ||
| 610 | + bdist_wheel.bdist_wheel.finalize_options(self) | ||
| 604 | 611 | ||
| 605 | - def finalize_options(self): | ||
| 606 | - bdist_wheel.bdist_wheel.finalize_options(self) | ||
| 607 | - | ||
| 608 | - def run(self): | ||
| 609 | - if self.xplat: | ||
| 610 | - _update_xlat_devtools() | ||
| 611 | - return bdist_wheel.bdist_wheel.run(self) | ||
| 612 | + def run(self): | ||
| 613 | + if self.xplat: | ||
| 614 | + _update_xlat_devtools() | ||
| 615 | + return bdist_wheel.bdist_wheel.run(self) | ||
| 612 | 616 | ||
| 613 | 617 | ############################################################################### | |
| 614 | 618 | ||
@@ -621,6 +625,15 @@ def run(self): | |||
| 621 | 625 | if not os.path.exists(_get_interop_filename()): | |
| 622 | 626 | setup_requires.append("pycparser") | |
| 623 | 627 | ||
| 628 | + cmdclass={ | ||
| 629 | + "install": InstallPythonnet, | ||
| 630 | + "build_ext": BuildExtPythonnet, | ||
| 631 | + "install_lib": InstallLibPythonnet, | ||
| 632 | + "install_data": InstallDataPythonnet, | ||
| 633 | + } | ||
| 634 | + if bdist_wheel: | ||
| 635 | + cmdclass["bdist_wheel"] = BDistWheelPythonnet | ||
| 636 | + | ||
| 624 | 637 | setup( | |
| 625 | 638 | name="pythonnet", | |
| 626 | 639 | version="2.4.1-dev", | |
@@ -633,13 +646,7 @@ def run(self): | |||
| 633 | 646 | long_description=_get_long_description(), | |
| 634 | 647 | ext_modules=[Extension("clr", sources=list(_get_source_files()))], | |
| 635 | 648 | data_files=[("{install_platlib}", ["{build_lib}/Python.Runtime.dll"])], | |
| 636 | - cmdclass={ | ||
| 637 | - "install": InstallPythonnet, | ||
| 638 | - "build_ext": BuildExtPythonnet, | ||
| 639 | - "install_lib": InstallLibPythonnet, | ||
| 640 | - "install_data": InstallDataPythonnet, | ||
| 641 | - "bdist_wheel": BDistWheelPythonnet, | ||
| 642 | - }, | ||
| 649 | + cmdclass=cmdclass, | ||
| 643 | 650 | classifiers=[ | |
| 644 | 651 | "Development Status :: 5 - Production/Stable", | |
| 645 | 652 | "Intended Audience :: Developers", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments