-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't pollute the working directory with lextab and yacctab #2
Comments
My understanding now is that this is only happening for me b/c I'm using a local development version of |
Some strange behaviour when installing from pip (pip install nicelib) _build_tables.py does not run on setup. Hence every time nicelib is imported it creates the tables. Only python setup.py install creates the tables every time.
Output:
If it is run a second time then the tables are generated, so the behavoir is quite strange.
|
I am able to reproduce this, I'l look into it. |
Considering yacctab.py and lextab.py are generated by pycparser on installation can we not just link to these files? Seems just changing lines 16 and 17 of cpp_parser.py to
works. |
This still happens for me. |
Currently, whenever we use
pycparser
(either directly or indirectly viacffi
),lextab.py
andyacctab.py
files are generated in the working directory. Instead, we should generate them in a temp directory.Unfortunately,
cffi
doesn't currently support setting this directory, thoughpycparser
does. As a hacky workaround, you can instantiate your ownCParser
which will use a temp directory, then set it as the global parser instance inpycparser
.See the
pco
driver inInstrumental
for a working example of this.The text was updated successfully, but these errors were encountered: