Using setuptools
Ivan Glushkov
gli.work at gmail.com
Thu Jun 26 05:26:06 PDT 2008
Hello.
On 6/25/08, David Wolever <wolever at cs.toronto.edu> wrote:
> On 25-Jun-08, at 11:34 AM, Ivan Glushkov wrote:
>
> > Hello, David.
> >
> > I've tried to use setuptools on my machine at work and it fails:
> >
> > $ python setup.py install
> > Traceback (most recent call last):
> > File "setup.py", line 3, in ?
> > from setuptools import setup, find_packages
> > ImportError: No module named setuptools
> >
> > I suppose the same situation might take place anywhere else, so i
> > propose not to use this module.
> > And thanks for the refactoring of our setup.py script! :)
> >
> D'oh! I'd forgotten about that.
> The generally accepted solution to this (used by, eg, SQLAlchemy) is to
> keep a copy of ez_setup.py (the script which installs setuptools --
> available here: peak.telecommunity.com/dist/ez_setup.py)
> along with their distribution, then adding this onto the top of setup.py
> (before the setuptools import):
> from ez_setup import use_setuptools
> use_setuptools()
> That will download and install setuptools if it is required.
I've read requirements of ez_setup.py:
"You will need at least Python 2.3.5, or if you are on a 64-bit
platform, Python 2.4.".
ditrack requires Python 2.3, so we should either set the minimal
version of Python to 2.4 (see our discussion about this in
http://lists.ditrack.org/pipermail/dev/2007-April/000210.html) or
don't use setuptools.
I suppose we should require Python 2.4, it seems to me that now it's
hard to find computers to such old version as 2.3. Though, i might be
wrong.
And by the way, rejection of requirement of python 2.3 will even
simplify our code (see DITrack/ThirdParty/Python/string.py).
> There are two reasons I'd prefer using setuptools:
> 0) `setup.py develop` is _incredibly_ useful
> 1) To get on the PyPi (http://pypi.python.org/pypi), so DT can be installed
> with easy_install and listed in a package's dependencies (so, for example,
> when someone runs `setup.py develop`, DT gets installed automatically,
> making it that much easier to access the project's issue database).
We're already on the PyPi:
http://pypi.python.org/pypi/DITrack/0.7
And please, explain once more about "setup.py develop".
I've found some information about it on
http://peak.telecommunity.com/DevCenter/EasyInstall
Have you said about it? Or not?
> (but, if that's the case, could someone at least document how to develop on
> DT?)
Vlad? :)
Ivan.
More information about the Dev
mailing list