Compare commits

...

3 Commits

Author SHA1 Message Date
Frederik Rietdijk
9b9a21fd4f pythonPackages.aiodns: 1.0.0 -> 1.0.1, fix test runner 2016-01-25 09:49:28 +01:00
Domen Kožar
0b3a49d78d python generic builder: fix typos 2016-01-25 09:38:39 +01:00
Domen Kožar
58f77b8219 setuptools: 19.4 -> 19.6, use setuptools shim 2016-01-25 09:38:33 +01:00
4 changed files with 11 additions and 23 deletions

View File

@ -50,9 +50,6 @@ then throw "${name} not supported for interpreter ${python.executable}"
else
let
# use setuptools shim (so that setuptools is imported before distutils)
# pip does the same thing: https://github.com/pypa/pip/pull/3265
setuppy = ./run_setup.py;
# For backwards compatibility, let's use an alias
doInstallCheck = doCheck;
in
@ -77,12 +74,9 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
runHook postConfigure
'';
# we copy nix_run_setup.py over so it's executed relative to the root of the source
# many project make that assumption
buildPhase = attrs.buildPhase or ''
runHook preBuild
cp ${setuppy} nix_run_setup.py
${python.interpreter} nix_run_setup.py ${lib.optionalString (setupPyBuildFlags != []) ("build_ext " + (lib.concatStringsSep " " setupPyBuildFlags))} bdist_wheel
${python.interpreter} -m setuptools.launch setup.py ${lib.optionalString (setupPyBuildFlags != []) ("build_ext " + (lib.concatStringsSep " " setupPyBuildFlags))} bdist_wheel
runHook postBuild
'';
@ -105,14 +99,14 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
installCheckPhase = attrs.checkPhase or ''
runHook preCheck
${python.interpreter} nix_run_setup.py test
${python.interpreter} -m setuptools.launch setup.py test
runHook postCheck
'';
postFixup = attrs.postFixup or ''
wrapPythonPrograms
# check if we have two packagegs with the same name in closure and fail
# check if we have two packages with the same name in closure and fail
# this shouldn't happen, something went wrong with dependencies specs
${python.interpreter} ${./catch_conflicts.py}
'';
@ -135,7 +129,7 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
} // meta // {
# add extra maintainer(s) to every package
maintainers = (meta.maintainers or []) ++ [ chaoflow iElectric ];
# a marker for release utilies to discover python packages
# a marker for release utilities to discover python packages
isBuildPythonPackage = python.meta.platforms;
};
})

View File

@ -1,6 +0,0 @@
import setuptools
import tokenize
__file__='setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))

View File

@ -4,11 +4,11 @@ stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
name = "${python.executable}-${shortName}";
version = "19.4"; # 18.4 and up breaks python34Packages.characteristic and many others
version = "19.6";
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz";
sha256 = "214bf29933f47cf25e6faa569f710731728a07a19cae91ea64f826051f68a8cf";
sha256 = "1s8jd6lgaqjk5vbc3h5grvabzbzsvsk67f1651mcr3hs7isqvm7c";
};
buildInputs = [ python wrapPython ];

View File

@ -377,18 +377,18 @@ in modules // {
aiodns = buildPythonPackage rec {
name = "aiodns-${version}";
version = "1.0.0";
version = "1.0.1";
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/a/aiodns/${name}.tar.gz";
sha256 = "95140e4d2b67ee16dfbf357d9b54d7453b58f1732e81f869a1803a3ba3773b0d";
sha256 = "595b78b8d54115d937cf60d778c02dad76b6f789fd527dab308f99e5601e7f3d";
};
propagatedBuildInputs = with self; [ pycares ] ++ optional isPy33 asyncio ++ optional (isPy26 || isPy27 || isPyPy) trollius;
# Tests are not distributed
# https://github.com/saghul/aiodns/issues/13
doCheck = false;
checkPhase = ''
${python.interpreter} tests.py
'';
meta = {
homepage = http://github.com/saghul/aiodns;