python3Packages.pysvn: 1.8.0 -> 1.9.12
This commit is contained in:
committed by
Jonathan Ringer
parent
5d56967eb2
commit
323536e341
@@ -1,43 +1,69 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
|
, lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, pkgs
|
|
||||||
, isPy3k
|
, isPy3k
|
||||||
, python
|
, python
|
||||||
|
, apr
|
||||||
|
, aprutil
|
||||||
|
, bash
|
||||||
|
, e2fsprogs
|
||||||
|
, expat
|
||||||
|
, gcc
|
||||||
|
, glibcLocales
|
||||||
|
, neon
|
||||||
|
, openssl
|
||||||
|
, pycxx
|
||||||
|
, subversion
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pysvn";
|
pname = "pysvn";
|
||||||
version = "1.8.0";
|
version = "1.9.12";
|
||||||
disabled = isPy3k;
|
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://pysvn.barrys-emacs.org/source_kits/${pname}-${version}.tar.gz";
|
url = "http://pysvn.barrys-emacs.org/source_kits/${pname}-${version}.tar.gz";
|
||||||
sha256 = "0srjr2qgxfs69p65d9vvdib2lc142x10w8afbbdrqs7dhi46yn9r";
|
sha256 = "sRPa4wNyjDmGdF1gTOgLS0pnrdyZwkkH4/9UCdh/R9Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgs.subversion pkgs.apr pkgs.aprutil pkgs.expat pkgs.neon pkgs.openssl ]
|
buildInputs = [ bash subversion apr aprutil expat neon openssl ]
|
||||||
++ (if stdenv.isLinux then [pkgs.e2fsprogs] else []);
|
++ lib.optionals stdenv.isLinux [ e2fsprogs ]
|
||||||
|
++ lib.optionals stdenv.isDarwin [ gcc ];
|
||||||
|
|
||||||
# There seems to be no way to pass that path to configure.
|
postPatch = ''
|
||||||
NIX_CFLAGS_COMPILE="-I${pkgs.aprutil.dev}/include/apr-1";
|
sed -i "117s|append(|insert(0, |" Tests/benchmark_diff.py
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd Source
|
cd Source
|
||||||
${python.interpreter} setup.py backport
|
${python.interpreter} setup.py backport
|
||||||
${python.interpreter} setup.py configure \
|
${python.interpreter} setup.py configure \
|
||||||
--apr-inc-dir=${pkgs.apr.dev}/include \
|
--apr-inc-dir=${apr.dev}/include \
|
||||||
--apu-inc-dir=${pkgs.aprutil.dev}/include \
|
--apu-inc-dir=${aprutil.dev}/include \
|
||||||
--apr-lib-dir=${pkgs.apr.out}/lib \
|
--pycxx-dir=${pycxx.dev}/include \
|
||||||
--svn-lib-dir=${pkgs.subversion.out}/lib \
|
--svn-inc-dir=${subversion.dev}/include/subversion-1 \
|
||||||
--svn-bin-dir=${pkgs.subversion.out}/bin \
|
--pycxx-src-dir=${pycxx.dev}/src \
|
||||||
--svn-root-dir=${pkgs.subversion.dev}
|
--apr-lib-dir=${apr.out}/lib \
|
||||||
'' + (if !stdenv.isDarwin then "" else ''
|
--svn-lib-dir=${subversion.out}/lib \
|
||||||
|
--svn-bin-dir=${subversion.out}/bin
|
||||||
|
'' + (lib.optionalString (stdenv.isDarwin && !isPy3k) ''
|
||||||
sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile
|
sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile
|
||||||
'');
|
'');
|
||||||
|
|
||||||
checkPhase = "make -C ../Tests";
|
checkInputs = [ glibcLocales ];
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
|
# It is not only shebangs, some tests also write scripts dynamically
|
||||||
|
# so it is easier to simply search and replace
|
||||||
|
sed -i "s|/bin/bash|${bash}/bin/bash|" ../Tests/test-*.sh
|
||||||
|
make -C ../Tests
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportCheck = [ "pysvn" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
dest=$(toPythonPath $out)/pysvn
|
dest=$(toPythonPath $out)/pysvn
|
||||||
@@ -45,15 +71,14 @@ buildPythonPackage rec {
|
|||||||
cp pysvn/__init__.py $dest/
|
cp pysvn/__init__.py $dest/
|
||||||
cp pysvn/_pysvn*.so $dest/
|
cp pysvn/_pysvn*.so $dest/
|
||||||
mkdir -p $out/share/doc
|
mkdir -p $out/share/doc
|
||||||
mv -v ../Docs $out/share/doc/pysvn-1.7.2
|
mv -v ../Docs $out/share/doc/pysvn-${version}
|
||||||
rm -v $out/share/doc/pysvn-1.7.2/generate_cpp_docs_from_html_docs.py
|
rm -v $out/share/doc/pysvn-${version}/generate_cpp_docs_from_html_docs.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Python bindings for Subversion";
|
description = "Python bindings for Subversion";
|
||||||
homepage = "http://pysvn.tigris.org/";
|
homepage = "http://pysvn.tigris.org/";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5644,7 +5644,9 @@ in {
|
|||||||
|
|
||||||
pystringtemplate = callPackage ../development/python-modules/stringtemplate { };
|
pystringtemplate = callPackage ../development/python-modules/stringtemplate { };
|
||||||
|
|
||||||
pysvn = callPackage ../development/python-modules/pysvn { };
|
pysvn = callPackage ../development/python-modules/pysvn {
|
||||||
|
inherit (pkgs) bash subversion apr aprutil expat neon openssl;
|
||||||
|
};
|
||||||
|
|
||||||
pytabix = callPackage ../development/python-modules/pytabix { };
|
pytabix = callPackage ../development/python-modules/pytabix { };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user