summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-10-29 10:53:00 -0400
committerKali Kaneko <kali@leap.se>2015-10-29 14:41:19 -0400
commit2bb129c96b7d858bce7e2902137f055da0aaf139 (patch)
tree04259f77be01e75e8b5721ed18a498ecc7086be9 /setup.py
parentadad9f6e6d3e74d4913f36a8fe2a7d3c41f4772d (diff)
[pkg] catch file errors for sdist
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index 5b05d5a2..8463c172 100755
--- a/setup.py
+++ b/setup.py
@@ -298,14 +298,20 @@ class cmd_sdist(versioneer_sdist):
# We need to copy the requirements to the specified path
# so that the client has a copy to do the startup checks.
copy_reqs(base_dir, withsrc=True)
- with open(os.path.join(base_dir,
- 'src', 'leap', '__init__.py'),
- 'w') as nuke_top_init:
- nuke_top_init.write('')
- with open(os.path.join(base_dir,
- 'src', 'leap', 'soledad', '__init__.py'),
- 'w') as nuke_soledad_ns:
- nuke_soledad_ns.write('')
+ try:
+ with open(os.path.join(base_dir,
+ 'src', 'leap', '__init__.py'),
+ 'w') as nuke_top_init:
+ nuke_top_init.write('')
+ except Exception:
+ pass
+ try:
+ with open(os.path.join(base_dir,
+ 'src', 'leap', 'soledad', '__init__.py'),
+ 'w') as nuke_soledad_ns:
+ nuke_soledad_ns.write('')
+ except Exception:
+ pass
def make_distribution(self):
# add our extra files to the list just before building the
@@ -359,7 +365,10 @@ class cmd_sdist(versioneer_sdist):
for module in self.leap_sumo_packages:
# check, just in case...
if module and module != "bitmask":
- shutil.rmtree("src/leap/" + _fix_namespace(module))
+ try:
+ shutil.rmtree("src/leap/" + _fix_namespace(module))
+ except Exception:
+ pass
import shutil