-
-
Notifications
You must be signed in to change notification settings - Fork 19
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 URLs no longer supported in __requires__? #22
Comments
Here's what changed. |
The changelog suggests in 2.16 that #18 changed the meaning of |
Sorry for the inconvenience. It was an unintentional limitation to constrain the meaning of And now it seems we've run up against a fundamental difference in the definition of requirements between pip and pkg_resources. Best I can understand, pkg_resources expects the
My instinct is the best thing to do here is to retain the constraint (to be consistent with pkg_resources, the defacto standard bearer for Depending on how well that approach satisfies the use case, or rather to the extent that it doesn't, I'd be open to rwt supporting another variable such as I'd also be open to expanding the meaning of @jwodder Can you share more about the impact of this change on your use-case and which of these three approaches above would best suit your expectation? In the meantime, I'll update the changelog to reflect the broader impact of this change. |
I don't think something like Because ideally I think using Tentative patch: rwt/scripts.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git i/rwt/scripts.py w/rwt/scripts.py
index 115e00c..335eff8 100644
--- i/rwt/scripts.py
+++ w/rwt/scripts.py
@@ -18,9 +18,12 @@ if sys.version_info < (3,):
class Dependencies(list):
index_url = None
+ dependency_links = []
def params(self):
prefix = ['--index-url', self.index_url] if self.index_url else []
+ for link in self.dependency_links:
+ prefix.extend(['--find-links', link])
return prefix + self
@@ -73,6 +76,12 @@ class DepsReader:
deps.index_url = self._read('__index_url__')
except Exception:
pass
+ try:
+ raw_links = self._read('__dependency_links__')
+ except Exception:
+ pass
+ else:
+ deps.dependency_links = list(pkg_resources.yield_lines(raw_links))
return deps
def _read(self, var_name): |
Just to be clear, example use case with the patch above: __requires__ = '''
foo==0.42
'''
__dependency_links__ = '''
git+ssh://git@example.com/repo.git#egg=foo-0.42
'''
[...] |
I like that idea. It follows patterns already in place for things like
It shouldn't fail, but it'll log a warning:
|
PR here: #24.
You're right. IMHO, it would be better if pip was not called if all requirements are already satisfied. |
Huge thanks @benoit-pierre. Released as 3.1. @jwodder Do let us know if this approach doesn't satisfy your needs. |
Suppress the spurious error from mypy as reported in python/mypy#15970. Closes #22.
Somewhere between versions 2.15.1 and 3.0, rwt stopped supporting (specifically, it appears to flat-out ignore) package specifiers of the form
git+ssh://git@example.com/repo.git
in__requires__
lists, though it continues to support them inrequirements.txt
files. I see no mention of this change inCHANGES.rst
; was it intentional? If not, could we have the old behavior back?The text was updated successfully, but these errors were encountered: