summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorStefano Rivera <github@rivera.za.net>2018-05-02 11:20:31 -0700
committerEli Bendersky <eliben@users.noreply.github.com>2018-05-02 11:20:31 -0700
commitaedb4ed5a96ed2d1ac10804c257d62148915533f (patch)
tree158954c6171abf94b0f73103b10b27c13ce1ddfb /setup.py
parent81a12ca210a75969ca0d2a606369e65968cf14a6 (diff)
downloadpycparser-aedb4ed5a96ed2d1ac10804c257d62148915533f.tar.gz
Don't ship .pyc files and don't create pyc files when building tables (#135)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 2a6adc5..9189712 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,12 @@ except ImportError:
def _run_build_tables(dir):
- from subprocess import call
- call([sys.executable, '_build_tables.py'],
- cwd=os.path.join(dir, 'pycparser'))
+ from subprocess import check_call
+ # This is run inside the install staging directory (that had no .pyc files)
+ # We don't want to generate any.
+ # https://github.com/eliben/pycparser/pull/135
+ check_call([sys.executable, '-B', '_build_tables.py'],
+ cwd=os.path.join(dir, 'pycparser'))
class install(_install):