How to turn a package into something pip can install

Roy Smith roy at panix.com
Fri Feb 14 21:26:03 EST 2014


In article <mailman.6949.1392429645.18130.python-list at python.org>,
 Ryan Gonzalez <rymg19 at gmail.com> wrote:

> python setup.py sdist

OK, I run that and I get a metar-1.4.0.tar.gz under dist.  If I move 
that tarfile to my packages directory, and run pip, I get:

$ pip install --no-index --quiet --find-links packages metar==1.4.0
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File 
"/home/roy/deploy/current/python/local/lib/python2.7/site-packages/pip-1.
1-py2.7.egg/pip/index.py", line 245, in _get_queued_page
    page = self._get_page(location, req)
  File 
"/home/roy/deploy/current/python/local/lib/python2.7/site-packages/pip-1.
1-py2.7.egg/pip/index.py", line 335, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File 
"/home/roy/deploy/current/python/local/lib/python2.7/site-packages/pip-1.
1-py2.7.egg/pip/index.py", line 452, in get_page
    resp = urlopen(url)
  File 
"/home/roy/deploy/current/python/local/lib/python2.7/site-packages/pip-1.
1-py2.7.egg/pip/download.py", line 85, in __call__
    response = urllib2.urlopen(self.get_request(url))
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 392, in open
    protocol = req.get_type()
  File "/usr/lib/python2.7/urllib2.py", line 254, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: packages

  Could not find any downloads that satisfy the requirement metar==1.4.0
No distributions at all found for metar==1.4.0
Storing complete log in /home/roy/.pip/pip.log






> 
> 
> On Fri, Feb 14, 2014 at 7:47 PM, Roy Smith <roy at panix.com> wrote:
> 
> > I want to use (https://github.com/timetric/python-metar).  Our
> > deployment process more or less requires that it be installed via pip.
> > We maintain our own cache of packages and install using:
> >
> > pip install --no-index --quiet --find-links packages --requirement
> > requirements.txt
> >
> > What I can't figure out is what I need to do to go from a clone of the
> > github repo to a tarball I can drop into our packages directory.  Is
> > there some tutorial somewhere that explains this?
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >



More information about the Python-list mailing list