Code Monkey home page Code Monkey logo

pkgtools's Issues

`requires.txt` file is not read correctly

pkgtools read extras too... For example, Sphinx's requires.txt is like this:

docutils>=0.7
Jinjia2
Pygments
...
[ex]
Babel

pkgtools puts Babel as a requirement too. That's wrong.

`pkgtools.pypi.real_name` does not work as expected

The documentation reads:

>>> real_name('sphinx')
'Sphinx'

However, I get:

>>> from pkgtools.pypi import real_name
>>> real_name("sphinx")
'sphinx'
>>> real_name("Sphinx")
'sphinx'
>>> 

I am on Debian testing, in a virtualenv, with:

$ pip freeze
pkgtools==0.7.3
$ python --version
Python 3.5.1+

TypeError: can't use a string pattern on a bytes-like object

Example from docs does not work on python 3.3
Is it supported as stated in the docs?

In [1]: from pkgtools.pypi import PyPIXmlRpc, PyPIJson

In [2]: pypi = PyPIJson('pyg')

In [3]: pypi.retrieve()['info']['author']
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-0bc801554547> in <module>()
----> 1 pypi.retrieve()['info']['author']

/Users/prophet/Envs/djangodash2013/lib/python3.3/site-packages/pkgtools/pypi.py in retrieve(self, req_func, timeout)
    284         url = self.URL.format(self.package_name, self.version)
    285         data = req_func(url, timeout)
--> 286         json_data = json.loads(data)
    287         self.version = json_data['info']['version']
    288         return json_data

/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    307             parse_int is None and parse_float is None and
    308             parse_constant is None and object_pairs_hook is None and not kw):
--> 309         return _default_decoder.decode(s)
    310     if cls is None:
    311         cls = JSONDecoder

/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/json/decoder.py in decode(self, s, _w)
    350
    351         """
--> 352         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    353         end = _w(s, end).end()
    354         if end != len(s):

TypeError: can't use a string pattern on a bytes-like object

PyPI HTTP Interface

pkgtools.pypi should add the possibility to interoperate with PyPI using the HTTP interface.
Something like this:

>>> p = PyPIHTTP('pkgtools')
>>> links = p.links()
>>> links.keys()
['pkgtools-0.1-py2.7.egg',
['pkgtools-0.2.tar.gz',
['pkgtools-0.1.tar.gz',
['pkgtools-0.2-py2.7.egg',
['0.2 home_page']
>>> links['pkgtools-0.2-py2.7.egg']
http://pypi.python.org/packages/2.7/p/pkgtools/pkgtools-0.2-py2.7.egg#md5=5183728db4b30b3caf38a5a99f88ec58'

etc.

example wrong

The first line of the documentation:

from pkgtools.pypi import PyPI

Is wrong because there is no PyPI class in pkgtools.pypi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.