Commit fab8f93e authored by tarek's avatar tarek

no more bdist_egg release

--HG--
branch : distribute
extra : rebase_source : dc5bb933d711a32efee224b6d632cceb73efbdcf
parent 55c87e48
......@@ -35,8 +35,7 @@ you start the installation of `Distribute`.
Installation Instructions
-------------------------
Distribute comes in two flavors: in eggs or as a source distribution. Archives
are available at the PyPI page.
Distribute is only released as a source distribution.
It can be installed using easy_install or pip, with the source tarball, with the
eggs distribution, or using the ``distribute_setup.py`` script provided online.
......@@ -67,58 +66,11 @@ Source installation
Download the source tarball, and uncompress it, then run the install command::
$ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.tar.gz
$ tar -xzvf distribute-0.6.tar.gz
$ wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.1.tar.gz
$ tar -xzvf distribute-0.6.1.tar.gz
$ cd distribute-0.6
$ python setup.py install
Egg installation
================
An Egg is a zip file with a `sh` script inserted in its head so it can be
`executed` in the shell.
Cygwin, Linux anc Mac OS/X
--------------------------
1. Download the appropriate egg for your version of Python (e.g.
``distribute-0.6-py2.4.egg``). Do NOT rename it.
2. Run it as if it were a shell script, e.g. ``sh distribute-0.6-py2.4.egg``.
Distutils will install itself using the matching version of Python (e.g.
``python2.4``), and will place the ``easy_install`` executable in the
default location for installing Python scripts (as determined by the
standard distutils configuration files, or by the Python installation).
If you want to install distribute to somewhere other than ``site-packages`` or
your default distutils installation locations for libraries and scripts, you
may include EasyInstall command-line options such as ``--prefix``,
``--install-dir``, and so on, following the ``.egg`` filename on the same
command line. For example::
sh distribute-0.6-py2.4.egg --prefix=~
Cygwin Note
-----------
If you are trying to install Distribute for the **Windows** version of Python
(as opposed to the Cygwin version that lives in ``/usr/bin``), you must make
sure that an appropriate executable (``python2.3``, ``python2.4``, or
``python2.5``) is on your **Cygwin** ``PATH`` when invoking the egg. For
example, doing the following at a Cygwin bash prompt will install Distribute
for the **Windows** Python found at ``C:\\Python24``::
ln -s /cygdrive/c/Python24/python.exe python2.4
PATH=.:$PATH sh distribute-0.6-py2.4.egg
rm python2.4
Windows
-------
Don't install Distribute trying to execute the egg, because it's aimed to
sh-based shells. Instead, use the ``distribute_setup.py`` method, that will
download the egg for you, then install the egg.
---------------------------
Uninstallation Instructions
---------------------------
......@@ -179,7 +131,7 @@ Install FAQ
You need in this case to build a virtualenv with the --no-site-packages option
or to install `Distribute` globally.
- **How does in interacts with zc.buildout ?**
- **How does Distribute interacts with zc.buildout ?**
Like virtualenv, Distribute has to be installed after setuptools. The simplest
way is to add it in a `zc.recipe.egg` section so the job is done when you
......
......@@ -26,32 +26,9 @@ is_jython = sys.platform.startswith('java')
if is_jython:
import subprocess
try:
from hashlib import md5
except ImportError:
from md5 import md5
DEFAULT_VERSION = "0.6"
DEFAULT_VERSION = "0.6.1"
DEFAULT_URL = "http://pypi.python.org/packages/%s/d/distribute/" % sys.version[:3]
md5_data = {
'distribute-0.6-py2.3.egg': '66d06db7fc91227585f81b0b27b07bab',
'distribute-0.6-py2.4.egg': '8fc3eb887ee98c506c38838955f9eee2',
'distribute-0.6-py2.5.egg': 'd87f6492c53d192c62e0334859d18b59',
'distribute-0.6-py2.6.egg': '89c46c2ed0c756dd278acc1482aa12f1',
}
def _validate_md5(egg_name, data):
if egg_name in md5_data:
digest = md5(data).hexdigest()
if digest != md5_data[egg_name]:
print >>sys.stderr, (
"md5 validation of %s failed! (Possible download problem?)"
% egg_name
)
sys.exit(2)
return data
def use_setuptools(
version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
download_delay=15
......@@ -135,7 +112,7 @@ and place it in this directory before rerunning this script.)
src = urllib2.urlopen(url)
# Read/write all in one block, so we don't create a corrupt file
# if the download is interrupted.
data = _validate_md5(egg_name, src.read())
data = src.read()
dst = open(saveto,"wb"); dst.write(data)
finally:
if src: src.close()
......@@ -425,39 +402,6 @@ def main(argv, version=DEFAULT_VERSION):
print "distribute version",version,"or greater has been installed."
print '(Run "distribute_setup.py -U distribute" to reinstall or upgrade.)'
def update_md5(filenames):
"""Update our built-in md5 registry"""
import re
for name in filenames:
base = os.path.basename(name)
f = open(name,'rb')
md5_data[base] = md5(f.read()).hexdigest()
f.close()
data = [" %r: %r,\n" % it for it in md5_data.items()]
data.sort()
repl = "".join(data)
import inspect
srcfile = inspect.getsourcefile(sys.modules[__name__])
f = open(srcfile, 'rb'); src = f.read(); f.close()
match = re.search("\nmd5_data = {\n([^}]+)}", src)
if not match:
print >>sys.stderr, "Internal error!"
sys.exit(2)
src = src[:match.start(1)] + repl + src[match.end(1):]
f = open(srcfile,'w')
f.write(src)
f.close()
if __name__ == '__main__':
if len(sys.argv) > 2 and sys.argv[1] == '--md5update':
update_md5(sys.argv[2:])
else:
main(sys.argv[1:])
main(sys.argv[1:])
#!/bin/sh
export VERSION="0.6.1"
# creating the releases
rm -rf dist
# updating the md5 hashes
python distribute_setup.py --md5update dist/distribute-$VERSION-py2.3.egg
python distribute_setup.py --md5update dist/distribute-$VERSION-py2.4.egg
python distribute_setup.py --md5update dist/distribute-$VERSION-py2.5.egg
python distribute_setup.py --md5update dist/distribute-$VERSION-py2.6.egg
# eggs
python2.3 setup.py -q egg_info -RDb '' bdist_egg # manual upload
python2.4 setup.py -q egg_info -RDb '' bdist_egg # manual upload
python2.5 setup.py -q egg_info -RDb '' bdist_egg register upload
python2.6 setup.py -q egg_info -RDb '' bdist_egg register upload
# now preparing the source release
python2.6 setup.py -q egg_info -RDb '' sdist register upload
echo You need to commit the md5 changes
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment