Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2014 19:11:58 +1100
From:      Kubilay Kocak <koobs.freebsd@gmail.com>
To:        python@FreeBSD.org
Cc:        Scott Sturdivant <scott.sturdivant@gmail.com>
Subject:   HEADS-UP and RFC - Adding setuptools as default RUN_DEPENDS
Message-ID:  <52FC7E4E.4020801@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------020707070007010608050805
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Two days ago I updated virtualenv, transitioning it away from the
deprecated USE_PYDISTUTILS=easy_install to USE_PYDISTUTILS=yes as many
other ports have recently.

I thought nothing of it until the following report by Scott (cc'd):

http://lists.freebsd.org/pipermail/freebsd-python/2014-February/006592.html

The summary of that thread is:

a) Any python software that uses *console_scripts* needs the
pkg_resources module from setuptools at run time. This basically means
anything that installs a CLI utility.

b) Package-only users don't get setuptools installed when they install
the packages of the above ports, because =yes *doesnt* set a RUN_DEPENDS
on it.

This breaks console script invocation, with the following error:

Traceback (most recent call last):
  File "/usr/local/bin/<script-name>", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Reproduction steps are:

1) Install port or package that uses console_scripts
2) If you installed the package, run the console script
3) If you installed the port
3.1) Run the console script
3.2) Remove py-setuptools
3.3) Run the console script again

Reproduced with: py-virtualenv (`virtualenv`), py-tox (`tox`) and
py-nose (`nosetests`)

We (python@) have now standardised on a consistent installation pattern
for all python software, whether pure-distutils or setuptools based, and
there are run-time requirements that are currently not being satisfied.

Attached is a patch moving RUN_DEPENDS+=setuptools from the
=easy_install only case, to the default case.

Patch review requested, other comments welcome.

./koobs

--------------020707070007010608050805
Content-Type: text/plain; charset=windows-1252;
 name="setuptools-is-run-depends-too.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="setuptools-is-run-depends-too.diff"

SW5kZXg6IGJzZC5weXRob24ubWsKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gYnNkLnB5dGhvbi5tawko
cmV2aXNpb24gMzQzODIxKQorKysgYnNkLnB5dGhvbi5tawkod29ya2luZyBjb3B5KQpAQCAt
NDE0LDExICs0MTQsMTEgQEAKIF9DVVJSRU5UUE9SVDo9CSR7UEtHTkFNRVBSRUZJWH0ke1BP
UlROQU1FfQogLmlmIGRlZmluZWQoVVNFX1BZRElTVFVUSUxTKSAmJiAke19DVVJSRU5UUE9S
VH0gIT0gJHtQWVRIT05fUEtHTkFNRVBSRUZJWH1zZXR1cHRvb2xzCiBCVUlMRF9ERVBFTkRT
Kz0JCSR7UFlUSE9OX1BLR05BTUVQUkVGSVh9c2V0dXB0b29scz4wOiR7UE9SVFNESVJ9L2Rl
dmVsL3B5LXNldHVwdG9vbHMKK1JVTl9ERVBFTkRTKz0JCSR7UFlUSE9OX1BLR05BTUVQUkVG
SVh9c2V0dXB0b29scz4wOiR7UE9SVFNESVJ9L2RldmVsL3B5LXNldHVwdG9vbHMKIC5lbmRp
ZgogCiAjIHNldHVwdG9vbHMgc3VwcG9ydAogLmlmIGRlZmluZWQoVVNFX1BZRElTVFVUSUxT
KSAmJiAke1VTRV9QWURJU1RVVElMU30gPT0gImVhc3lfaW5zdGFsbCIKLVJVTl9ERVBFTkRT
Kz0JCSR7UFlFQVNZSU5TVEFMTF9DTUR9OiR7UE9SVFNESVJ9L2RldmVsL3B5LXNldHVwdG9v
bHMKIAogUFlESVNUVVRJTFNfQlVJTERfVEFSR0VUPz0JCWJkaXN0X2VnZwogUFlESVNUVVRJ
TFNfSU5TVEFMTF9UQVJHRVQ/PQllYXN5X2luc3RhbGwK
--------------020707070007010608050805--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52FC7E4E.4020801>