diff options
| author | Benoit Pierre <benoit.pierre@gmail.com> | 2018-09-17 23:40:12 +0200 |
|---|---|---|
| committer | Benoit Pierre <benoit.pierre@gmail.com> | 2019-10-07 23:05:15 +0200 |
| commit | 16a3ef93fc66373f6c5f4da12303dd111403fcb1 (patch) | |
| tree | 2dc23ae542e4b88f2bfe38e35188972fc0d70ce7 /setuptools/wheel.py | |
| parent | d7810a901382b827146874704f33bce896e1fb21 (diff) | |
| download | external_python_setuptools-16a3ef93fc66373f6c5f4da12303dd111403fcb1.tar.gz external_python_setuptools-16a3ef93fc66373f6c5f4da12303dd111403fcb1.tar.bz2 external_python_setuptools-16a3ef93fc66373f6c5f4da12303dd111403fcb1.zip | |
wheel: fix installation of empty namespace package
Diffstat (limited to 'setuptools/wheel.py')
| -rw-r--r-- | setuptools/wheel.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/wheel.py b/setuptools/wheel.py index 2982926a..22eec05e 100644 --- a/setuptools/wheel.py +++ b/setuptools/wheel.py @@ -213,6 +213,8 @@ class Wheel: for mod in namespace_packages: mod_dir = os.path.join(destination_eggdir, *mod.split('.')) mod_init = os.path.join(mod_dir, '__init__.py') - if os.path.exists(mod_dir) and not os.path.exists(mod_init): + if not os.path.exists(mod_dir): + os.mkdir(mod_dir) + if not os.path.exists(mod_init): with open(mod_init, 'w') as fp: fp.write(NAMESPACE_PACKAGE_INIT) |
