diff options
author | Dwayne Litzenberger <dlitz@dlitz.net> | 2016-04-01 18:12:33 -0700 |
---|---|---|
committer | Dwayne Litzenberger <dlitz@dlitz.net> | 2016-04-01 18:12:33 -0700 |
commit | ffef78f5985685bdedf5c106c73752f468b137c2 (patch) | |
tree | ec313890259c4d34eaf3af258216b1ac7908bf72 | |
parent | 6712eb246953b85fe76d7375236c91d14cc1bab5 (diff) | |
download | pycrypto-ffef78f5985685bdedf5c106c73752f468b137c2.tar.gz |
setup.py: Allow configure args to be specified in PYCRYPTO_CONFIGURE_ARGS env var
This allows site-specific configure options like --without-gmp to be
provided during a pip install.
-rw-r--r-- | .travis.yml | 7 | ||||
-rw-r--r-- | setup.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml index f8e4942..a7602b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,14 @@ env: - PYENV_VERSION=2.7.6 - PYENV_VERSION=2.7.6 python_flags=-Qnew - PYENV_VERSION=2.7.6 python_flags=-OO - - PYENV_VERSION=2.7.6 preconfigure_args=--without-gmp + - PYENV_VERSION=2.7.6 PYCRYPTO_CONFIGURE_ARGS=--without-gmp # pip won't install on Python 3.0 (lack of collections.OrderedDict object?) # - PYENV_VERSION=3.0.1 - PYENV_VERSION=3.1.5 - PYENV_VERSION=3.2.5 - PYENV_VERSION=3.3.5 - PYENV_VERSION=3.4.0 - - PYENV_VERSION=3.4.0 preconfigure_args=--without-gmp + - PYENV_VERSION=3.4.0 PYCRYPTO_CONFIGURE_ARGS=--without-gmp # PyCrypto does not support PyPy yet. # See https://github.com/dlitz/pycrypto/pull/59 # - PYENV_VERSION=pypy-2.3.1 @@ -25,7 +25,7 @@ env: language: python before_install: # Unexport variables - - declare +x preconfigure_args python_flags + - declare +x python_flags # List local virtualenvs - ls ~/virtualenv || true # Show environment @@ -50,6 +50,5 @@ before_install: script: - "major_version=$( python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1 )" - if [ "$major_version" -ge 3 ] ; then extra_flags="$extra_flags -bb" ; fi - - if [ -n "$preconfigure_args" ] ; then ./configure $preconfigure_args ; fi - python -tt $extra_flags $python_flags setup.py -q build - python -tt $extra_flags $python_flags setup.py test @@ -274,6 +274,8 @@ class PCTBuildConfigure(Command): cmd = "sh configure" # we use "sh" here so that it'll work on mingw32 with standard python.org binaries if self.verbose < 1: cmd += " -q" + if os.getenv("PYCRYPTO_CONFIGURE_ARGS"): + cmd += " " + os.getenv("PYCRYPTO_CONFIGURE_ARGS") if os.system(cmd) != 0: raise RuntimeError("autoconf error") |