collective / dexterity.membrane

enables dexterity content items to be used as users and groups in Plone sites
3 stars 14 forks source link

dexterity.membrane 0.2 release is broken #5

Closed davisagli closed 11 years ago

davisagli commented 11 years ago

Traceback:

Getting distribution for 'dexterity.membrane'.
Running easy_install:
/Users/davisagli/Work/mountaineers/bin/python "-c" "from setuptools.command.easy_install import main;main()" "-mUNxd" "/Users/davisagli/.buildout/eggs/tmpcNmLY1" "-q" "/Users/davisagli/.buildout/downloads/dist/dexterity.membrane-0.2.tar.gz"
path=/Users/davisagli/.buildout/eggs/setuptools-0.6c11-py2.7.egg

error: README.txt: No such file or directory
An error occurred when trying to install dexterity.membrane 0.2. Look above this message for any errors that were output by easy_install.
While:
  Installing client1.
  Getting distribution for 'dexterity.membrane'.
Error: Couldn't install: dexterity.membrane 0.2
saily commented 11 years ago

First thing which came into my mind was a missing MANIFEST.in include for .txt or .rst files - as usual :-), but README.txt is packed into sdist package. Any idea what's going wrong here?

cewing commented 11 years ago

I was able this morning to successfully install from release 0.2, so I wonder if this might have been a bad download rather than a problem with the release.

mauritsvanrees commented 11 years ago

Installs fine here too. Two possible problems:

  1. Maybe the download failed the first time and now a broken download is in your buildout cache. The dexterity.membrane-0.2.tar.gz file should be 30247 bytes.
  2. README.txt is a link to README.rst. Maybe that does not work on your machine.
davisagli commented 11 years ago

I redownloaded the file and still had the problem, so the second possibility sounds more likely.

saily commented 11 years ago

Hi, windows users will run into problems here, because their OS does not support symbolic links. I renamed README.txt to README.rst, updated setup.py and added include statements to MANIFEST.in file. This should fix that issue. See 439bd68afd7fb6b49ae286ef9f89bb4e4818fd24

@mauritsvanrees agree for release 0.3?

mauritsvanrees commented 11 years ago

Short version: seems good to me. I will make a release.

The long version version is 'funny'.

In lots of packages I create a README.txt with the real text. I think you get a warning somewhere from python when you create a dist and it does not contain either a README.txt or README file.

To satisfy the github gods I make a symlink from README.rst to README.txt so we have a nice looking front page on github.

In setup.py I load the contents of README.txt as long description.

If you create a dist with python setup.py sdist --formats=zip, like zest.releaser does, you get a zip file and everything is fine. Both README.txt and README.rst are included as normal files with all the content.

If you create a dist with python setup.py sdist, on most systems you get a tar.gz file and it will now only work for some people. Problems include, but may not be limited to, the following:

  1. When a user installs this package with Python 2.4 (Plone 3) you may hit a corner case: if the tarball contains a directory that has a / as the hundredth character in the path Python will stop processing the tarball. This is the reason zest.releaser uses --formats=zip.
  2. In a gloriously succeeded attempt to do something insane, symlinks get reversed. This is the problem of this issue. If you download the 0.2 tar ball and inspect it, you will see that README.txt is a symlink to README.rst instead of the other way around. At least, it is that way on my Mac.

So: please use --formats=zip when creating an sdist. zest.releaser is your friend. :-) But the proposed change will fix it. I will make a release.

mauritsvanrees commented 11 years ago

I have released 0.3 with this fix.

mauritsvanrees commented 11 years ago

@reinout: If anyone ever wants to convince us to remove --formats=zip from zest.releaser you can point them to this issue. :-)

davisagli commented 11 years ago

0.3 works. Thanks!