[Distutils] [Python-ideas] Version control system link in package meta data
Alexander Walters
tritium-list at sdamon.com
Sat Mar 12 05:44:35 EST 2016
(cross-replying to distutils-sig at python.org)
For a tool like this to work reliably, the semantics of the project urls
would have to change (as of right now, there is no set requirement that
a VCS link in project URL's point to <the thing you put in a vcs to
clone>), nor is there a requirement that the field even be present. For
this to be useful for your tool, projects would have to be required, or
at least heavily encouraged, to put VCS links in their pypi listings.
Moreover, such a requirement would additionally need to limit what type
of VCS links you post as to make the tool reasonable to maintain. (Not
everyone uses git, let alone github. Do you want to write a tool that
supports Team Foundation Server?)
Another option would be to pull in source packages with your tool, but
that too would require that people actually post source packages for
their projects on PyPI. There is no such requirement as it stands, and
the number of pure-python projects posting sdists may actually decrease
with the uptake of universal wheels.
Automating this process is not impossible. As you said, you could write
your own tool to do it, but as it stands, even with that tool, you would
have to do quite a bit of manual legwork still.
I agree, it would be nice if everyone used git (or any of a small set of
VCS), and all the packages on pypi listed their repositories in the
metadata. If that were the case, this tool might already exist. In the
current state of things, though, i don't think it makes much sense to
produce a general purpose tool for this.
On 3/12/2016 05:12, Tymoteusz Jankowski wrote:
> Hi,
> tldr: install project and its requirements as cloned repositories (if
> possible)
>
> Let's say I'm developing requests
> <https://github.com/kennethreitz/requests> library which relies on
> these
> <https://github.com/kennethreitz/requests/blob/master/requirements.txt> packages.
> My workflow is this:
>
> $ git clone https://github.com/kennethreitz/requests.git
> $ cd requests
> $ virtualenv requests
> $ . requests/bin/activate.fish
> $ pip install -r requirements.txt
>
> Now I can change Requests library easily and commit changes, but when
> i have to change a library from Requests' requirements I have to clone
> and reinstall library (It's boring + I'm lazy).
> I need tool that works like this:
>
> $ magic-command install requests
> 1 the tool checks in Requests package meta where sources are stored
> 2 clone the source
> 3 do the same for each package from requirements (or fallback to
> current method)
>
> I could write the tool and be the only one in the world using it ;)
> but there should be an option for storing repository link.
> Could you advice anything?
> I found this:
> https://www.python.org/dev/peps/pep-0345/#project-url-multiple-use
> but
> 1 I'm not sure it's right option
> 2 I can't see handler for this option in distutils
> <https://bitbucket.org/carljm/python-distutils/src>
>
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160312/d7fed43a/attachment.html>
More information about the Distutils-SIG
mailing list