Don't ship .pyc files and don't create pyc files when building tables (#135)
diff --git a/setup.py b/setup.py
index 2a6adc5..9189712 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,12 @@
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):