pythonPackages.pyhepmc: refactor move to python-modules
added tests
This commit is contained in:
parent
12067dc30f
commit
acfa2e172b
47
pkgs/development/python-modules/pyhepmc/default.nix
Normal file
47
pkgs/development/python-modules/pyhepmc/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, fetchurl
|
||||
, pkgs
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyhepmc";
|
||||
version = "0.5.0";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1rbi8gqgclfvaibv9kzhfis11gw101x8amc93qf9y08ny4jfyr1d";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# merge PR https://bitbucket.org/andybuckley/pyhepmc/pull-requests/1/add-incoming-outgoing-generators-for/diff
|
||||
./pyhepmc_export_edges.patch
|
||||
# add bindings to Flow class
|
||||
./pyhepmc_export_flow.patch
|
||||
];
|
||||
|
||||
# regenerate python wrapper
|
||||
preConfigure = ''
|
||||
rm hepmc/hepmcwrap.py
|
||||
swig -c++ -I${pkgs.hepmc}/include -python hepmc/hepmcwrap.i
|
||||
'';
|
||||
|
||||
buildInputs = [ pkgs.swig pkgs.hepmc ];
|
||||
|
||||
HEPMCPATH = pkgs.hepmc;
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} test/test1.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A simple wrapper on the main classes of the HepMC event simulation representation, making it possible to create, read and manipulate HepMC events from Python code";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
|
||||
}
|
@ -1500,40 +1500,7 @@ in {
|
||||
|
||||
python-ly = callPackage ../development/python-modules/python-ly {};
|
||||
|
||||
pyhepmc = buildPythonPackage rec {
|
||||
name = "pyhepmc-${version}";
|
||||
version = "0.5.0";
|
||||
disabled = isPy3k;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://pypi/p/pyhepmc/${name}.tar.gz";
|
||||
sha256 = "1rbi8gqgclfvaibv9kzhfis11gw101x8amc93qf9y08ny4jfyr1d";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# merge PR https://bitbucket.org/andybuckley/pyhepmc/pull-requests/1/add-incoming-outgoing-generators-for/diff
|
||||
../development/python-modules/pyhepmc_export_edges.patch
|
||||
# add bindings to Flow class
|
||||
../development/python-modules/pyhepmc_export_flow.patch
|
||||
];
|
||||
|
||||
# regenerate python wrapper
|
||||
preConfigure = ''
|
||||
rm hepmc/hepmcwrap.py
|
||||
swig -c++ -I${pkgs.hepmc}/include -python hepmc/hepmcwrap.i
|
||||
'';
|
||||
|
||||
buildInputs = with pkgs; [ swig hepmc ];
|
||||
|
||||
HEPMCPATH = pkgs.hepmc;
|
||||
|
||||
meta = {
|
||||
description = "A simple wrapper on the main classes of the HepMC event simulation representation, making it possible to create, read and manipulate HepMC events from Python code";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
||||
|
||||
pytest = self.pytest_37;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user