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

setup.py not working with --root directive (Packaging) #638

Closed
rdoursenaud opened this issue Mar 10, 2015 · 6 comments
Closed

setup.py not working with --root directive (Packaging) #638

rdoursenaud opened this issue Mar 10, 2015 · 6 comments
Milestone

Comments

@rdoursenaud
Copy link
Contributor

I'm trying to make the Arch Linux package.
If I run
python setup.py install --root="test" --optimize=1
I get
error: install_script 'windows/frescobaldi-wininst.py' not found in scripts

The normal install without the --root option works fine.

Any idea of what's triggering this behavior?
Maybe a workaround.
Had no problems with prior versions.

@dliessi
Copy link
Collaborator

dliessi commented Mar 10, 2015

I was about to report the same issue on Mac: the command used in MacPorts
python2.7 setup.py --no-user-cfg install --prefix=/path/to/prefix --root=/path/to/destroot
fails with
error: install_script 'windows/frescobaldi-wininst.py' not found in scripts.
This used to work with previous versions.

@dliessi dliessi mentioned this issue Mar 10, 2015
@proski
Copy link
Collaborator

proski commented Mar 10, 2015

This is easily reproducible on Ubuntu. --optimize=1 is not needed. windows/frescobaldi-wininst.py comes from setup.cfg

setup.py only adds windows/frescobaldi-wininst.py to the scripts list on Windows. An easy fix would be to add it unconditionally. But I hope there is a better way.

@dliessi dliessi added this to the 2.18.1 milestone Mar 10, 2015
@rdoursenaud
Copy link
Contributor Author

For now, I simply patched the setup.cfg to remove windows related lines.
I also hope there's a better way!

@dliessi
Copy link
Collaborator

dliessi commented Mar 15, 2015

This happens if setuptools is used instead of distutils.
I could not find a solution. @wbsoft @proski Any ideas?

For now, I simply patched the setup.cfg to remove windows related lines.

This is what I also did in MacPorts.

@wbsoft
Copy link
Collaborator

wbsoft commented Mar 15, 2015

In previous versions the frescobaldi-wininst.py was in the root directory. Now it is in windows/. It is added to the scripts-to-install on Windows. It does some magic such as setting shortcuts and file associations. (It is not used in the Windows installer, which is made using Inno Setup and has its own setup stuff.) It is also not used on any other platform.

Where is this --root option documented and what can I do to fix this?

@wbsoft wbsoft closed this as completed in 567c874 Mar 15, 2015
@dliessi
Copy link
Collaborator

dliessi commented Mar 15, 2015

I confirm that your fix solved the issue.
Indeed moving the options in setup.py is probably easier than finding a solution to keep setup.cfg.

In previous versions the frescobaldi-wininst.py was in the root directory. Now it is in windows/.

In previous versions we were using only distutils.
Before your latest commit 567c874, installing with distutils worked correctly, installing with setuptools did not.

Where is this --root option documented [...]?

See distutils/command/install.py, lines 92, 358, 517 and distutils/util.py, line 139.

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

No branches or pull requests

4 participants