Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 3 additions & 31 deletions pkgs/development/python-modules/aplpy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,25 @@
setuptools,
setuptools-scm,
shapely,
wheel,
}:

buildPythonPackage rec {
pname = "aplpy";
version = "2.2.0";
format = "pyproject";

disabled = pythonOlder "3.6";
pyproject = true;

src = fetchPypi {
pname = "aplpy";
inherit version;
hash = "sha256-oUylUM7/6OyEJFrpkr9MjXilXC/ZIdBQ5au4cvyZiA0=";
};

# Fix build with Astropy 6.1, Python 3.12 and matplotlib 3.9
patches = [
# https://github.com/aplpy/aplpy/pull/496
(fetchpatch {
url = "https://github.com/aplpy/aplpy/commit/d232a4984bc6a83ec86dfdc3ab3bc1b05de44c48.patch";
hash = "sha256-jGUTzIrVdGNPy0BV8w46jzz045fDXBisiwIn90bn7oY=";
})
# https://github.com/aplpy/aplpy/pull/497
(fetchpatch {
url = "https://github.com/aplpy/aplpy/commit/468be394970b39f1aaa6debef51eb674e2dd86d8.patch";
hash = "sha256-/ovLrFOKb3RQ8TZSviuOV6EYNgz0gtrhVWZLFJBrzFg=";
})
# https://github.com/aplpy/aplpy/pull/500
(fetchpatch {
url = "https://github.com/aplpy/aplpy/commit/c9049261b3724821f4d309d85fe73cabcc04d890.patch";
hash = "sha256-ivdXLh1Z+WG3EL5u1wO+lqz6X1AP6WpyoZix5YiqW0w=";
})
# https://github.com/aplpy/aplpy/pull/503
(fetchpatch {
url = "https://github.com/aplpy/aplpy/commit/edc2aa9770b72bd3ac42db95a6e027b276be9c31.patch";
hash = "sha256-QUZenY3XQ/T2tl5apxZUqjf4ACjOzJWb+1AUp5limi4=";
})
];

nativeBuildInputs = [
build-system = [
setuptools
setuptools-scm
wheel
];

propagatedBuildInputs = [
dependencies = [
astropy
matplotlib
numpy
Expand Down
24 changes: 9 additions & 15 deletions pkgs/development/python-modules/pyregion/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
fetchFromGitHub,
# needed to build
cython,
extension-helpers,
oldest-supported-numpy,
setuptools,
setuptools-scm,
wheel,
# needed to run
astropy,
numpy,
Expand All @@ -20,36 +20,30 @@

buildPythonPackage rec {
pname = "pyregion";
version = "2.2.0";
version = "2.3.0";
pyproject = true;

# pypi src contains cython-produced .c files which don't compile
# with python3.9
src = fetchFromGitHub {
owner = "astropy";
repo = pname;
rev = version;
hash = "sha256-r2STKnZwNvonXATrQ5q9NVD9QftlWI1RWl4F+GZSxVg=";
repo = "pyregion";
tag = "v${version}";
hash = "sha256-mEO2PbUSTVy7Qmm723/lGL6PYQzbRazIPZH51SWebvs=";
};

env = lib.optionalAttrs stdenv.cc.isClang {
# Try to remove on next update. generated code returns a NULL in a
# function where an int is expected.
NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
};

propagatedBuildInputs = [
dependencies = [
astropy
numpy
pyparsing
];

nativeBuildInputs = [
build-system = [
cython
extension-helpers
oldest-supported-numpy
setuptools
setuptools-scm
wheel
];

nativeCheckInputs = [
Expand All @@ -66,7 +60,7 @@ buildPythonPackage rec {
'';

meta = with lib; {
changelog = "https://github.com/astropy/pyregion/blob/${version}/CHANGES.rst";
changelog = "https://github.com/astropy/pyregion/blob/${src.tag}/CHANGES.rst";
description = "Python parser for ds9 region files";
homepage = "https://github.com/astropy/pyregion";
license = licenses.mit;
Expand Down
17 changes: 9 additions & 8 deletions pkgs/development/python-modules/spectral-cube/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
casa-formats-io,
dask,
joblib,
looseversion,
numpy,
packaging,
radio-beam,
tqdm,

# checks
aplpy,
Expand All @@ -27,25 +29,24 @@ buildPythonPackage rec {
version = "0.6.6";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
pname = "spectral_cube";
inherit version;
hash = "sha256-bjBghr5WrfC4NH5cyiy9RUiCmJSUHBtyD61bd1i/4kM=";
};

patches = [ ./distutils-looseversion.patch ];

build-system = [ setuptools-scm ];

dependencies = [
astropy
casa-formats-io
dask
joblib
looseversion
numpy
packaging
radio-beam
];
tqdm
] ++ dask.optional-dependencies.array;

nativeCheckInputs = [
aplpy
Expand Down

This file was deleted.