Mercurial > hgrepos > Python > libs > ConfigMix
comparison setup.py @ 583:4e61df27b4e1
Put the ".egg-info" check into a common location
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 09 Jan 2022 13:26:56 +0100 |
| parents | 0467b3ae34ea |
| children | 233bd8bbda28 |
comparison
equal
deleted
inserted
replaced
| 582:0467b3ae34ea | 583:4e61df27b4e1 |
|---|---|
| 59 wcp_idx = None | 59 wcp_idx = None |
| 60 else: | 60 else: |
| 61 del sys.argv[wcp_idx] | 61 del sys.argv[wcp_idx] |
| 62 | 62 |
| 63 | 63 |
| 64 # | |
| 65 # Otherwise some cached package_data would be used. | |
| 66 # But our package data differs between "standard" builds and | |
| 67 # builds with "--windows-cross-pack". | |
| 68 # | |
| 69 | |
| 70 if os.path.isdir(PROJECT_NAME + ".egg-info"): | |
| 71 raise RuntimeError( | |
| 72 "please remove %s.egg-info before" % (PROJECT_NAME,)) | |
| 73 | |
| 64 if wcp_idx is None: | 74 if wcp_idx is None: |
| 65 | |
| 66 # | |
| 67 # Otherwise some cached package_data would be used. | |
| 68 # But our package data differs between "standard" builds and | |
| 69 # builds with "--windows-cross-pack". | |
| 70 # | |
| 71 | |
| 72 if os.path.isdir(PROJECT_NAME + ".egg-info"): | |
| 73 raise RuntimeError( | |
| 74 "please remove %s.egg-info before" % (PROJECT_NAME,)) | |
| 75 | |
| 76 # | 75 # |
| 77 # Handle the optinal C-extension for Python3.7+ and CPython only. | 76 # Handle the optinal C-extension for Python3.7+ and CPython only. |
| 78 # PyPy does not need this. | 77 # PyPy does not need this. |
| 79 # | 78 # |
| 80 | 79 |
| 127 cmdclass["bdist_wheel"] = BDistWheel | 126 cmdclass["bdist_wheel"] = BDistWheel |
| 128 else: | 127 else: |
| 129 | 128 |
| 130 if not os.path.isfile("configmix/_speedups.pyd"): | 129 if not os.path.isfile("configmix/_speedups.pyd"): |
| 131 raise RuntimeError("no _speedups.pyd found") | 130 raise RuntimeError("no _speedups.pyd found") |
| 132 | |
| 133 if os.path.isdir(PROJECT_NAME + ".egg-info"): | |
| 134 raise RuntimeError( | |
| 135 "please remove %s.egg-info before" % (PROJECT_NAME,)) | |
| 136 | 131 |
| 137 setup_extra_kwds["package_data"] = { | 132 setup_extra_kwds["package_data"] = { |
| 138 "configmix": ["*.pyd"] | 133 "configmix": ["*.pyd"] |
| 139 } | 134 } |
| 140 | 135 |
