rubik / pkgtools Goto Github PK
View Code? Open in Web Editor NEWA Python library to work with Python Packages
Home Page: http://pkgtools.readthedocs.org
License: MIT License
A Python library to work with Python Packages
Home Page: http://pkgtools.readthedocs.org
License: MIT License
The first line of the documentation:
from pkgtools.pypi import PyPI
Is wrong because there is no PyPI class in pkgtools.pypi
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.
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+
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.