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
bdist_msi upload fails #57928
Comments
Running setup.py bdist_msi upload fails with something like: c:\Python27\python.exe setup.py bdist_msi upload The attached patch fixes it. |
Thanks! Given the fragility of distutils, we try to add a test for every fix we commit, but I don’t remember if we already have a basic HTTP server to test the upload command. If not, I think I’ll commit this after manual testing (my Windows VM crashes on boot, so it may take some time for me to get to this). |
It's a bug in bdist_msi not in the upload command. You can check that distribution.dist_files point to valid files after running the command. |
there's a workaround in http://pypi.python.org/pypi/xdistutils#the-bdist-msi-fixed-command |
I don’t know if the bdist_msi command runs without user interaction. If so, then the test in the attached patch should pass on Windows. Can you please test it? |
Ralf, could you test my patch? |
sorry, I'm currently short on time and don't use windows at the moment. bdist_msi runs without user interaction. just let the buildbots test it. |
New changeset 3d1362fa07c3 by Éric Araujo in branch '3.2': |
New changeset 7671932c98d3 by Éric Araujo in branch '2.7': |
New changeset 4cfcda9e80cb by Éric Araujo in branch '3.2': New changeset 449c9fc2fc2d by Éric Araujo in branch 'default': |
Will watch buildbots tomorrow and close if they are OK. Will backport to distutils2 later. |
Buildbots fail when calling listdir; will try to fix this or revert tomorrow. Help would be appreciated. |
I’m working on this. |
New changeset 077b42a54803 by Éric Araujo in branch '2.7': |
New changeset 7e629bacec87 by Éric Araujo in branch '3.2': New changeset 17106d7d34b4 by Éric Araujo in branch 'default': |
I finally got a virtual machine up and running and was able to diagnose the problem. There are two things. First, the dist directory (where the msi file will be created) is created relative to the current working directory, which explains why listdir in the temporary project directory caused the test to fail. Second, after your patch bdist_wininst puts a full path in the dist.dist_files list, but it should use a relative path, like other bdist commands do. (This choice comes from the fact that setup scripts must be run from their parent directory.) Fixing the first problem is just a matter of adding os.chdir(project_dir) in the test; the second problem is also easy, using os.path.join and self.dist_dir. I chose to backout the commits because I won’t be able to make a correct patch right now, I have to configure file sharing between my host and my VM. Let’s have the buildbots green for a while and then break them again (not :). Debugging this made me realize that all tests should use os.path.join('dist', filename) instead of e.g. 'dist/blah-1.0.rpm' in test_bdist_rpm; I’ll do that in another commit. |
I forgot to mention two other problems in my test:
|
AFAIK pypi.python.org disallows uploads of .msi files. That means I've lost interest in this issue. Feel free to close it. |
schmir: your information on msi support is probably outdated; pypi.python.org does support MSI files, see for example |
I have been bitten by the bug today, too. |
Distutils is now deprecated (see PEP-632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: