Feature request: support pip repository
PyPi repository is very famous, and saves us from going through source download and build via distutils etc. Can you please support that?
Maybe something like:
<repository type="pip" name="pypi" href="https://pypi.org/simple" /> <distutils id="numpy"> <branch repo="pypi" module="numpy" version="1.18.3" /> </distutils>
I am not sure about
distutils part though... Maybe it can be something different.
I imagine the implementation can be very similar to that of tarball repository, with download phase as:
buildscript.execute(['pip', 'download', '--index-url', self.href, '--dest', localdir, '%s==%s' % (self.module, self.version)], extra_env = extra_env)
and install phase as:
for localfile in glob.glob(os.path.join(localdir, '%s-%s*' % (self.module, self.version))): buildscript.execute(['pip', 'install', localfile], extra_env = extra_env)
In this example, I used destination dir since getting the original filename or changing it was not so obvious to me. I believe there should be cleaner way to do that (e.g. using
pip search or similar APIs). At worst, you can capture the stdout.