Skip to content
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

pyinstaller --onefile option gives peculiar warning #783

Closed
pyinstaller-tickets-migration opened this issue Oct 18, 2014 · 9 comments
Closed

Comments

@pyinstaller-tickets-migration

Original date: 2013/09/27
Original reporter: *jos DOT postma AND gmail DOT COOM *

Building the .exe seems to work out fine, however, running it gives:

WARNING: file already exists but should not: D:\Users\postma\AppData\Local\Temp_MEI33522\Include\pyconfig.h

When I build the .exe WITHOUT the --onefile option the warning does not appear upon running the executable.

@pyinstaller-tickets-migration pyinstaller-tickets-migration added this to the PyInstaller 2.2 milestone Oct 18, 2014
@matysek matysek added the @low label Oct 18, 2014
@matysek matysek modified the milestones: PyInstaller 3.0, PyInstaller 2.2 Oct 18, 2014
@matysek
Copy link
Member

matysek commented Oct 18, 2014

Original date: 2013/09/27

Thanks for reporting.

@pyinstaller-tickets-migration
Copy link
Author

Original date: 2013/10/04
Original reporter: anonymous

I ran the archive_viewer.py utility (from PyInstaller) on one of my own --onefile executables that has the same error and found that pyconfig.h is included twice:

(31374007, 6521, 21529, 1, 'x', 'include\\pyconfig.h'),
(31380528, 6521, 21529, 1, 'x', 'Include\\pyconfig.h'),
(31387049, 984, 2102, 1, 'x', 'pytz\\zoneinfo\\CET'),

Ilya Tolchinsky over at StackOverflow found a workaround:
http://stackoverflow.com/a/19163950/1354930

--dthor

@pyinstaller-tickets-migration
Copy link
Author

Original date: 2013/11/27
Original reporter: *wtobia AND gmail DOT COOM *

I ran into the same problem, and figured out that it is due to the case-insensitive Windows paths leading to multiple tuples in the TOC:

('Include\\pyconfig.h', 'C:\\Python27\\Include\\pyconfig.h', 'DATA')
('include\\pyconfig.h', 'C:\\Python27\\include\\pyconfig.h', 'DATA')

In order to solve this, I made the following change in build.py, class TOC, def append:

            if tpl[2] in ["BINARY", "DATA"]:
                # Normalize the case for binary files only (to avoid duplicates
                # for different cases under Windows). We can't do that for
                # Python files because the import semantic (even at runtime)
                # depends on the case.

This code is already there for BINARY, I simply added DATA. But I'm not sure if this could be the real solution. It might introduce other incompatibilities.

@matysek
Copy link
Member

matysek commented Oct 18, 2014

Original date: 2014/01/13

pyconfig.h is included in the following hooks. Probably one hook does not handle pyconfig.h properly and uses lower or upper case version.

./PyInstaller/hooks/hook-sysconfig.py
./PyInstaller/hooks/hook-distutils.py

@pyinstaller-tickets-migration
Copy link
Author

Original date: 2014/05/14
Original reporter: *hithwen AND gmail DOT COOM *

I'm having a similar issue but with Makefile (running in Linux, from a virtual env):
'WARNING: file already exists but should not: /tmp/_MEI8ujVxl/../../../usr/lib/python2.7/config-x86_64-linux-gnu/Makefile\n../../../usr/lib/python2.7/config-x86_64-linux-gnu/Makefile could not be extracted!\n'

In out00-Analysis.toc I can see:
('lib/python2.7/config/Makefile', '/usr/lib/python2.7/config/Makefile', 'DATA') as the only appearances

but in /logdict2.7.3.final.0-1.log I can see two datas declaration:

datas=[('include/python2.7/pyconfig.h', '/usr/include/python2.7/pyconfig.h', 'DATA'), ('lib/python2.7/config/Makefile', '/usr/lib/python2.7/config/Makefile', 'DATA')]>
datas=[('local/include/python2.7/pyconfig.h', '$VIRTUAL_ENV/local/include/python2.7/pyconfig.h', 'DATA'), ('lib/python2.7/config/Makefile', '$VIRTUAL_ENV/lib/python2.7/config/Makefile', 'DATA')]>

@pyinstaller-tickets-migration
Copy link
Author

Original date: 2014/05/28
Original reporter: lorenzo AND villani DOT me

I'd like to add that we've been using the solution proposed in comment:5 for around six months without problems.

1 similar comment
@pyinstaller-tickets-migration
Copy link
Author

Original date: 2014/05/28
Original reporter: lorenzo AND villani DOT me

I'd like to add that we've been using the solution proposed in comment:5 for around six months without problems.

@matysek matysek closed this as completed Oct 18, 2014
@matysek
Copy link
Member

matysek commented Oct 18, 2014

Original date: 2014/06/10

This should be fixed in the development version.

@htgoebel
Copy link
Member

Original date: 2014/07/14

Replying to [comment:7 hithwen@…]:

I'm having a similar issue but with Makefile (running in Linux, from a virtual env):

Thanks for your pull-request #145. I just merged it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants