Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.7 kB · 162 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163{ lib, fetchPypi, buildPythonPackage, pythonOlder,
# build time stdenv, cython, extension-helpers, setuptools, setuptools-scm,
# dependencies astropy-iers-data, numpy, packaging, pyerfa, pyyaml,
# optional-dependencies scipy, matplotlib, ipython, ipywidgets, ipykernel, pandas, certifi, dask, h5py, pyarrow, beautifulsoup4, html5lib, sortedcontainers, pytz, jplephem, mpmath, asdf, asdf-astropy, bottleneck, fsspec, s3fs,
# testing pytestCheckHook, pytest-xdist, pytest-astropy-header, pytest-astropy, threadpoolctl,
}:
buildPythonPackage rec { pname = "astropy"; version = "7.1.0"; pyproject = true;
disabled = pythonOlder "3.11";
src = fetchPypi { inherit pname version; hash = "sha256-yPJUMiKVsbjPJDA9bxVb9+/bbBKCiCuWbOMEDv+MU8U="; };
env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument"; };
build-system = [ cython extension-helpers setuptools setuptools-scm ];
dependencies = [ astropy-iers-data numpy packaging pyerfa pyyaml ];
optional-dependencies = lib.fix (self: { recommended = [ scipy matplotlib ]; ipython = [ ipython ]; jupyter = [ ipywidgets ipykernel # ipydatagrid pandas ] ++ self.ipython; all = [ certifi dask h5py pyarrow beautifulsoup4 html5lib sortedcontainers pytz jplephem mpmath asdf asdf-astropy bottleneck fsspec s3fs ] ++ self.recommended ++ self.ipython ++ self.jupyter ++ dask.optional-dependencies.array ++ fsspec.optional-dependencies.http; });
nativeCheckInputs = [ pytestCheckHook pytest-xdist pytest-astropy-header pytest-astropy threadpoolctl ] ++ optional-dependencies.recommended;
pythonImportsCheck = [ "astropy" ];
__darwinAllowLocalNetworking = true;
preCheck = '' export HOME="$(mktemp -d)" export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 )) # See https://github.com/astropy/astropy/issues/17649 and see # --hypothesis-profile=ci pytest flag below. cp conftest.py $out/ # https://github.com/NixOS/nixpkgs/issues/255262 cd "$out" ''; pytestFlags = [ "--hypothesis-profile=ci" ]; postCheck = '' rm conftest.py '';
meta = { description = "Astronomy/Astrophysics library for Python"; homepage = "https://www.astropy.org"; license = lib.licenses.bsd3; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ kentjames doronbehar ]; };}