Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#11877 closed defect (fixed)

System Information issue with pygments

Reported by: Thijs Triemstra Owned by: Jun Omae
Priority: normal Milestone: 1.0.3
Component: admin/web Version: 1.1dev
Severity: normal Keywords: wheel pkginfo
Cc: Branch:
Release Notes:

Support distribution metadata in wheel packages for about page

API Changes:
Internal Changes:

Description (last modified by Thijs Triemstra)

When I visit /about on a trac 1.1.3dev-r13408 as admin user and look at the system information table I see the following version for pygments 2.0.1:

Failed to read PKG-INFO file for Pygments 2.0.1: [Errno 2] No such file or directory: '/home/thijs/.virtualenvs/collab-trac/lib/python2.7/site-packages/Pygments-2.0.1.dist-info/PKG-INFO'

I suggest to hide the version ('unknown') or fix the issue that causes this value.

Attachments (0)

Change History (11)

comment:1 by Thijs Triemstra, 10 years ago

Description: modified (diff)

comment:2 by Thijs Triemstra, 10 years ago

Version: 1.1dev

comment:3 by Jun Omae, 10 years ago

Are you using wheel?

comment:4 by Thijs Triemstra, 10 years ago

This was done in a virtualenv with pip. I checked out the svn trunk and installed trac in that virtualenv with python setup.py install. Not sure if it used a wheel file, there's a Pygments-2.0.1.dist-info and pygments folder in lib/python2.7/site-packages.

in reply to:  4 comment:5 by Ryan J Ollos, 10 years ago

Replying to thijstriemstra:

there's a Pygments-2.0.1.dist-info and pygments folder in lib/python2.7/site-packages.

Could you post the ls output for lib/python2.7/site-packages and lib/python2.7/site-packages/pygments?

comment:6 by Jun Omae, 10 years ago

Keywords: wheel pkginfo added
Milestone: next-stable-1.0.x

If pip is 1.5.6 (probably 1.4+), it seems pip installs compiled *.whl package.

$ virtualenv /dev/shm/t11877
New python executable in /dev/shm/t11877/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
$ /dev/shm/t11877/bin/pip install --upgrade pip
$ /dev/shm/t11877/bin/pip --version
pip 1.5.6 from /dev/shm/t11877/local/lib/python2.7/site-packages (python 2.7)
$ /dev/shm/t11877/bin/pip install Pygments
Downloading/unpacking Pygments
  Downloading Pygments-2.0.1-py2-none-any.whl (672kB): 672kB downloaded
  Storing download in cache at /home/jun66j5/arc/pip/https%3A%2F%2Fpypi.python.org%2Fpackages%2F2.7%2FP%2FPygments%2FPygments-2.0.1-py2-none-any.whl
Installing collected packages: Pygments
Successfully installed Pygments
Cleaning up...
$ ls -l /dev/shm/t11877/lib/python2.7/site-packages/
total 8
drwxr-xr-x 4 jun66j5 jun66j5 200 Dec 13 12:25 distribute-0.6.24-py2.7.egg
-rw-r--r-- 1 jun66j5 jun66j5 215 Dec 13 12:25 easy-install.pth
drwxr-xr-x 6 jun66j5 jun66j5 760 Dec 13 12:25 pip
drwxr-xr-x 2 jun66j5 jun66j5 200 Dec 13 12:25 pip-1.5.6-py2.7.egg-info
drwxr-xr-x 6 jun66j5 jun66j5 720 Dec 13 12:25 pygments
drwxr-xr-x 2 jun66j5 jun66j5 180 Dec 13 12:25 Pygments-2.0.1.dist-info
-rw-r--r-- 1 jun66j5 jun66j5  30 Dec 13 12:25 setuptools.pth

Currently, Trac doesn't support Wheel package, e.g. *.dist-info.

Work around is to reinstall with https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz.

$ pip uninstall -y Pygments
$ pip install https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz#md5=e0daf4c14a4fe5b630da765904de4d6c

comment:7 by Jun Omae, 10 years ago

Milestone: next-stable-1.0.x1.0.3
Owner: set to Jun Omae
Status: newassigned

Proposed changes in jomae.git@t11877.

comment:8 by Christian Boos, 10 years ago

Looks good! Is this all we need to do for supporting "wheels", just a different key for the metadata?

[OT] I see you're using [#<ticket>] as a prefix for your commit messages, probably for the same reason I'm using (#ticket), i.e. commit --amend or rebase's removal of comment-like lines, however in your case this formats to a link to the #<ticket> anchor…

comment:9 by Thijs Triemstra, 10 years ago

A backport to your LTS version would be nice as well.

in reply to:  8 comment:10 by Jun Omae, 10 years ago

Updated jomae.git@t11877, uses *.dist-info/RECORD file to detect that a resource is in installed files.

Looks good! Is this all we need to do for supporting "wheels", just a different key for the metadata?

The wheel uses metadata 2.0. According to the document and actually-installed metadata file, no different key is needed.

Another issue, bdist_wheel can compile Trac-1.0.2-py2-none-any.whl included compiled message catalogs. pip 1.5 and later with *.whl package installs correctly Trac library and script files. However, pip 1.4.x install only Trac library, script files aren't installed.

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:11 by Jun Omae, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [13538] and merged to trunk in [13539].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.