File tree Expand file tree Collapse file tree 1 file changed +23
-9
lines changed
pkgs/development/python-modules/netcdf4 Expand file tree Collapse file tree 1 file changed +23
-9
lines changed Original file line number Diff line number Diff line change 55 cftime ,
66 curl ,
77 cython ,
8- fetchPypi ,
8+ fetchFromGitHub ,
99 hdf5 ,
1010 isPyPy ,
1111 libjpeg ,
2020 zlib ,
2121} :
2222
23- buildPythonPackage rec {
23+ let
24+ version = "1.7.2" ;
25+ suffix = lib . optionalString ( lib . match ''.*\.post[0-9]+'' version == null ) "rel" ;
26+ tag = "v${ version } ${ suffix } " ;
27+ in
28+ buildPythonPackage {
2429 pname = "netcdf4" ;
25- version = "1.7.1.post2" ;
30+ inherit version ;
2631 pyproject = true ;
2732
2833 disabled = isPyPy || pythonOlder "3.8" ;
2934
30- src = fetchPypi {
31- inherit pname version ;
32- hash = "sha256-N9VX42ZUiJ1wIBkr+1b51fk4lMsymX64N65YbFOP17Y=" ;
35+ src = fetchFromGitHub {
36+ owner = "Unidata" ;
37+ repo = "netcdf4-python" ;
38+ inherit tag ;
39+ hash = "sha256-orwCHKOSam+2eRY/yAduFYWREOkJlWIJGIZPZwQZ/RI=" ;
3340 } ;
3441
3542 build-system = [
@@ -39,20 +46,27 @@ buildPythonPackage rec {
3946 wheel
4047 ] ;
4148
42- propagatedBuildInputs = [
49+ dependencies = [
4350 certifi
4451 cftime
52+ numpy
53+ ] ;
54+
55+ buildInputs = [
4556 curl
4657 hdf5
4758 libjpeg
4859 netcdf
49- numpy
5060 zlib
5161 ] ;
5262
5363 checkPhase = ''
64+ runHook preCheck
65+
5466 pushd test/
5567 NO_NET=1 NO_CDL=1 ${ python . interpreter } run_all.py
68+
69+ runHook postCheck
5670 '' ;
5771
5872 env = {
@@ -69,7 +83,7 @@ buildPythonPackage rec {
6983 meta = with lib ; {
7084 description = "Interface to netCDF library (versions 3 and 4)" ;
7185 homepage = "https://github.com/Unidata/netcdf4-python" ;
72- changelog = "https://github.com/Unidata/netcdf4-python/raw/v ${ version } /Changelog" ;
86+ changelog = "https://github.com/Unidata/netcdf4-python/raw/${ tag } /Changelog" ;
7387 maintainers = [ ] ;
7488 license = licenses . mit ;
7589 } ;
You can’t perform that action at this time.
0 commit comments