Modify

#10669 closed defect (fixed)

pip install TracAccountManager fails on 0.4 release

Reported by: ejucovy Owned by: hasienda
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: distribute PyPi
Cc: rjollos Trac Release:

Description

First of all, thanks and congratulations on the release!

When installing the new TracAccountManager 0.4 from PyPI with pip, installation fails:

$ pip install TracAccountManager
[..]
IOError: [Errno 2] No such file or directory: 'build/TracAccountManager/setup.py'

Installation does work successfully with easy_install TracAccountManager however.

When I unpack the tarball from PyPI manually, I see that the files get unpacked into a directory acct_mgr-0.4/. It looks like pip doesn't know to look in this directory for setup.py.

How was the tarball created and uploaded to PyPI? (The standard method is running python setup.py sdist upload from the directory that contains the setup.py file.) When I run python setup.py sdist from a checkout of accountmanagerplugin, the generated tarball does not put its files in an acct_mgr-0.4 directory -- so I wonder if the tarball for the release was generated in a different way?

Attachments (0)

Change History (5)

comment:1 in reply to: ↑ description Changed 23 months ago by hasienda

  • Cc rjollos added
  • Keywords distribute PyPi added

Replying to ejucovy:

First of all, thanks and congratulations on the release!

You're welcome.

How was the tarball created and uploaded to PyPI? (The standard method is running python setup.py sdist upload from the directory that contains the setup.py file.) When I run python setup.py sdist from a checkout of accountmanagerplugin, the generated tarball does not put its files in an acct_mgr-0.4 directory -- so I wonder if the tarball for the release was generated in a different way?

Not it wasn't uploaded the "standard" way. If so, I wouldn't have had as much control over what exactly got uploaded in the first place, including code singing. So I've done the packaging to a tarball by hand, just as I did with the acct_mgr-0.3.2 before.

Btw, that didn't raise complaints by now despite of 156 source downloads, and it was a big advantage over the ancient acct_mgr-0.2.1dev, that had been advertised before for a much too long period of time.

Now, is there a way to fix the current state, and by sticking to the current version tag? I didn't care for pip yet, because it worked for me with 'easy_install'. Sorry, if this was partially ignorant, but distribution is obviously not a strong part of mine yet. Eventually you might be able to help me with that? Advise welcomed.

comment:2 follow-up: Changed 23 months ago by ejucovy

I tried generating and uploading tarballs by hand a few different ways, to see what is actually causing the problem. It looks like the problem is the leading ./ in the tarball's file paths:

$ tar tvf TracAccountManager-0.4.tar.gz
drwxr-xr-x  0 hoffst hoffst      0 Dec  1 16:06 ./acct_mgr-0.4/
-rw-r--r--  0 hoffst hoffst   2702 Dec  1 16:06 ./acct_mgr-0.4/COPYING
-rw-r--r--  0 hoffst hoffst   1150 Dec  1 16:06 ./acct_mgr-0.4/README

[etc]

These ./ prefixes seem to get in there if you generate the tarball like so:

$ tar czf filename.tar.gz ./acct_mgr-0.4/

If you generate the tarball with this command instead, the ./ prefixes don't appear, and pip doesn't have any trouble with the resulting tarball :

$ tar czf filename.tar.gz acct_mgr-0.4/

So, the "solution" would be to regenerate the tarball in a way that strips those leading ./s in the file paths. But the workaround ("install with easy_install") is easy enough too. And this really seems like a bug in pip, especially since easy_install is able to handle the files -- so I've filed a bug with pip's maintainers here.

So, considering all that, I certainly wouldn't blame you if you decide to wontfix this. :-)

comment:3 in reply to: ↑ 2 Changed 23 months ago by hasienda

Replying to ejucovy:

I tried generating and uploading tarballs by hand a few different ways, to see what is actually causing the problem. It looks like the problem is the leading ./ in the tarball's file paths:
...
So, the "solution" would be to regenerate the tarball in a way that strips those leading ./s in the file paths.

Easy enough to not try it. Thanks for your research and explanation.

But the workaround ("install with easy_install") is easy enough too. And this really seems like a bug in pip, especially since easy_install is able to handle the files -- so I've filed a bug with pip's maintainers here.

Welcome, thanks for the effort as well.

So, considering all that, I certainly wouldn't blame you if you decide to wontfix this. :-)

Not my attitude, as you may notice yourself, if you follow my lines of development for a while.

comment:4 Changed 23 months ago by hasienda

Done re-packaged without the './', confirmation for the fix welcomed. Since it's not directly related to the source code, you may even close and mark this ticket as resolved, if that's the case indeed.

Thank you again for taking care, even more as almost 200 other downloads of this and the previous source package for acct_mgr-0.3.2 went without any complaint at all so far. You made the difference, and might even have improved my way of packaging for this as well as future occasions.

comment:5 Changed 23 months ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed

Thanks very much! pip install TracAccountManager is working now.

Add Comment

Modify Ticket

Action
as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.