aboutsummaryrefslogtreecommitdiffstats
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
parent81a12ca210a75969ca0d2a606369e65968cf14a6 (diff)
downloadplatform_external_python_pycparser-aedb4ed5a96ed2d1ac10804c257d62148915533f.tar.gz
platform_external_python_pycparser-aedb4ed5a96ed2d1ac10804c257d62148915533f.tar.bz2
platform_external_python_pycparser-aedb4ed5a96ed2d1ac10804c257d62148915533f.zip
Don't ship .pyc files and don't create pyc files when building tables (#135)
-rw-r--r--MANIFEST.in1
-rw-r--r--setup.py9
2 files changed, 7 insertions, 3 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 219a05d..8017b7e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,6 +6,7 @@ include README.*
include LICENSE
include CHANGES
include setup.*
+exclude setup.pyc
recursive-exclude tests yacctab.* lextab.*
recursive-exclude examples yacctab.* lextab.*
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):