Is setuptools necessary in trac/env.py?

0 views
Skip to first unread message

W. Martin Borgert

unread,
Sep 29, 2009, 7:55:09 PM9/29/09
to trac...@googlegroups.com
Hi,

Trac seems to depend on the Python setuptools, but my impression
is that only pkg_resources is really needed at runtime. The only
use of setuptools itself I can find is in trac/env.py, and only
to get the version number of the setuptools:

self.systeminfo = [
('Trac', get_pkginfo(core).get('version', VERSION)),
('Python', sys.version),
('setuptools', setuptools.__version__),
]

It would be nice (but not crucial, of course), if Trac could
depend on pkg-resources instead of setuptools, the first being a
small subset of the latter. Is the version number of setuptools
important here or is it safe to remove the line?

TIA!

Felix Schwarz

unread,
Sep 30, 2009, 3:46:21 AM9/30/09
to trac...@googlegroups.com
Am 30.09.2009 01:55, schrieb W. Martin Borgert:
> It would be nice (but not crucial, of course), if Trac could
> depend on pkg-resources instead of setuptools, the first being a
> small subset of the latter.

Is it possible just to depend on pkg_resources? AFAIK pypi has it only
bundled with setuptools so easy_install won't be able to find a
pkg_resources package.

fs

W. Martin Borgert

unread,
Sep 30, 2009, 5:58:49 PM9/30/09
to trac...@googlegroups.com
On 2009-09-30 09:46, Felix Schwarz wrote:
> Is it possible just to depend on pkg_resources? AFAIK pypi has it
> only bundled with setuptools so easy_install won't be able to find a
> pkg_resources package.

At least in Debian (and Ubuntu) python-pkg-resources is a
separate package, that is much smaller than python-setuptools.

Noah Kantrowitz

unread,
Sep 30, 2009, 6:49:33 PM9/30/09
to trac...@googlegroups.com

The size difference when installed is 492kB. I think this is a new definition of the term "much smaller".

--Noah

W. Martin Borgert

unread,
Sep 30, 2009, 7:11:36 PM9/30/09
to trac...@googlegroups.com
On 2009-09-30 15:49, Noah Kantrowitz wrote:
> The size difference when installed is 492kB. I think this is a new definition of the term "much smaller".

Well, only in terms of relation, which is around 1:5 :~)

Anyway, you're right: compared to Python and Trac and PostgreSQL
and Apache and Subversion and hundreds of Wiki pages and tickets
with huge attachments this is not at all significant.

It really doesn't matter much, but there was a bug report at
Debian about the issue, so take at least a look into it. I
wonder where the version information of setuptools is used or
displayed in Trac?

W. Martin Borgert

unread,
Sep 30, 2009, 7:25:18 PM9/30/09
to trac...@googlegroups.com
On 2009-10-01 01:11, W. Martin Borgert wrote:
> It really doesn't matter much, but there was a bug report at
> Debian about the issue, so take at least a look into it.

Should be: "so I take at least a look into it", of course.

Felix Schwarz

unread,
Oct 1, 2009, 3:04:55 AM10/1/09
to trac...@googlegroups.com
Am 30.09.2009 23:58, schrieb W. Martin Borgert:
> At least in Debian (and Ubuntu) python-pkg-resources is a
> separate package, that is much smaller than python-setuptools.

I think for most linux distributions it is not (Fedora, RHEL, Suse) only
have python-setuptools. But if it helps finer-grained dependencies, I'm
for it :-)

However you should be careful because I suspect some plugins still need
the complete setuptools package but so far they rely on trac to pull it in.

fs

Felix Schwarz

unread,
Oct 1, 2009, 3:05:06 AM10/1/09
to trac...@googlegroups.com
Am 01.10.2009 01:11, schrieb W. Martin Borgert:
> It really doesn't matter much, but there was a bug report at
> Debian about the issue, so take at least a look into it. I
> wonder where the version information of setuptools is used or
> displayed in Trac?

Go to 'About trac' - there you find a list of components with their
versions.

fs

W. Martin Borgert

unread,
Oct 1, 2009, 4:37:06 AM10/1/09
to trac...@googlegroups.com
On 2009-10-01 09:04, Felix Schwarz wrote:
> I think for most linux distributions it is not (Fedora, RHEL, Suse)
> only have python-setuptools. But if it helps finer-grained
> dependencies, I'm for it :-)

Probably it's not worth any effort. But many thanks for the
explanations!

Reply all
Reply to author
Forward
0 new messages