-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Git and Mercurial revision checkout not working under Windows #1740
Comments
Yes, apparently Windows does not do delayed expansion by default, that does not mean that the second command is not executed in the right directory, just that variable expansion for all commands is done prior to execution (and not independently for each command as it's about to be executed). A simple test to check the behavior is using In any case, if you have an issue with setuptools' VCS code, you should provide a reproducible example, but really it's best to use and rely on pip instead, as its VCS code is more complete (and better tested). |
Checking for new implementation solving issue pypa#1740
Okay, a reproducible example:
The suggested change fixes this behaviour. PS: Thanks for the quick response! I thought about using pip, although I would also be happy to hereby improve setuptools' VCS code ^^ |
PPS: I should have mentioned that the example should of course be executed under Windows. |
Dependency links are no longer supported by pip, you should use a direct URL requirement instead (see PEP 540): from setuptools import setup
requirements = [
"pyqtgraph @ git+https://github.com/2xB/pyqtgraph@2xB-patches",
]
setup(
# Metadata
name='test_t',
version='0.0.1',
install_requires=requirements,
) And then of course use pip to install, not As for the error you're getting with the original
So the wrong version of pyqtgraph gets installed: |
Regarding the error you get from my file: This is because in your tests the test setup.py you execute is inside an other git repository, in which the |
Correcting the first part of my last comment: Ough, I used an old version of [EDIT] I would btw. understand if this was a question I could better ask elsewhere, but it currently decides how important the setuptools dependency links are for me and how happy I would be in seeing the pull request or a similar fix merged. |
I hadn't read this thread before accepting the PR (I probably should have). I do think the proposed approach is more robust than the one that was used previously, so I'm happy to see it incorporated, even if it is using behavior in discouraged parts of the codebase. I did not intend to countermand Benoit's opinion. Happy to revert at your discretion, @benoit-pierre. |
Further information: I was not able to reproduce this behaviour in Windows 7, it seemingly is a Windows 10 thing. Thank you again both of you for this quick reaction and also for this very interesting discussion! I will now also further look into how to incorporate @benoit-pierre s comments into my projects. |
@jaraco: well, using @2xB: the unfortunate truth is direct URL requirements are a very poor replacement for dependency links. In fact, I think there's pretty much useless, see discussion here: pypa/pip#5898. In your case, I would change the requirement to |
The revision checkout routines located in
setuptools/setuptools/package_index.py
, functions _download_git and _download_hg, rely on(cd %s && <command>)
to execute<command>
in%s
. This does not work under Windows, as simply tested by executingcd .. && echo %cd%
.Further reading: https://stackoverflow.com/q/55641332
The text was updated successfully, but these errors were encountered: