Tristan Van Berkom pushed to branch master at BuildStream / buildstream
Commits:
-
adfb9291
by Tristan Van Berkom at 2019-01-18T21:23:05Z
-
d114a6bd
by Tristan Van Berkom at 2019-01-18T22:07:22Z
1 changed file:
Changes:
| 1 |
-from setuptools.sandbox import run_setup
|
|
| 2 | 1 |
import os
|
| 3 | 2 |
import pytest
|
| 4 | 3 |
import re
|
| 5 | 4 |
import shutil
|
| 5 |
+import subprocess
|
|
| 6 | 6 |
|
| 7 | 7 |
|
| 8 | 8 |
SETUP_TEMPLATE = '''\
|
| ... | ... | @@ -88,7 +88,9 @@ def generate_pip_package(tmpdir, pypi, name, version='0.1'): |
| 88 | 88 |
f.write(INIT_TEMPLATE.format(name=name))
|
| 89 | 89 |
os.chmod(main_file, 0o644)
|
| 90 | 90 |
|
| 91 |
- run_setup(setup_file, ['sdist'])
|
|
| 91 |
+ # Run sdist with a fresh process
|
|
| 92 |
+ p = subprocess.run(['python3', 'setup.py', 'sdist'], cwd=tmpdir)
|
|
| 93 |
+ assert p.returncode == 0
|
|
| 92 | 94 |
|
| 93 | 95 |
# create directory for this package in pypi resulting in a directory
|
| 94 | 96 |
# tree resembling the following structure:
|
