Opened 4 years ago

Closed 3 years ago

#10847 closed defect (fixed)

"" test fetches dependencies

Reported by: dcf Owned by: dcf
Priority: Medium Milestone:
Component: Archived/Flashproxy Version:
Severity: Keywords:
Cc: infinity0, asn Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


make test or python test attempts to download and build M2Crypto if you don't already have it installed.

~/flashproxy$ python test
running test
Searching for M2Crypto
Best match: M2Crypto 0.22.3
Processing M2Crypto-0.22.3.tar.gz
Writing /tmp/easy_install-JYaMle/M2Crypto-0.22.3/setup.cfg
Running M2Crypto-0.22.3/ -q bdist_egg --dist-dir /tmp/easy_install-JYaMle/M2Crypto-0.22.3/egg-dist-tmp-W0yfDL
unable to execute swig: No such file or directory
error: Setup script exited with error: command 'swig' failed with exit status 1

At least, we need to disable this network fetching somehow. From previous experience I learned that there's no way to prevent setuptools from automatically downloading packages. You can fake it out, however, by setting the http_proxy and https_proxy environment variables, which is what they do in Debian packages.

Another possible alternative is to run the tests in a way that doesn't go through setuptools.

Child Tickets

Change History (5)

comment:1 Changed 4 years ago by infinity0

Cc: asn added

adding asn because the new obfsproxy-with-scramblesuit also does this for PyYAML.

obfsproxy$ python test
running test
Searching for pyyaml
Best match: PyYAML 3.10
Writing /tmp/easy_install-Ws4zSb/PyYAML-3.10/setup.cfg
Running PyYAML-3.10/ -q bdist_egg --dist-dir /tmp/easy_install-Ws4zSb/PyYAML-3.10/egg-dist-tmp-in2Tpn
Last edited 4 years ago by infinity0 (previous) (diff)

comment:2 Changed 4 years ago by dcf

This general setuptools problem also started to happen during a TBB build in #11116. The building of obfsproxy tries to download argparse.

comment:3 Changed 4 years ago by dcf

The current version of the Debian LibraryStyleGuide doesn't mention the proxy trick, but it's in this old version:

comment:4 Changed 4 years ago by infinity0

We could set os.environ["http_proxy"] and os.environ["https_proxy"] by default at the top of the scripts, before the rest of setuptools is called. (Perhaps even add it as a utility to pyptlib.)

This is hacky, but we would be fixing a bug - it is true that the default behaviour of a normal build script ought not to do this sort of thing.

comment:5 Changed 3 years ago by dcf

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.