nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 60 lines 1.4 kB view raw
1{ 2 buildPythonPackage, 3 fetchPypi, 4 lib, 5 setuptools, 6 six, 7 pypblib, 8 pytestCheckHook, 9}: 10buildPythonPackage rec { 11 pname = "python-sat"; 12 version = "1.8.dev26"; 13 pyproject = true; 14 15 build-system = [ setuptools ]; 16 17 src = fetchPypi { 18 inherit version; 19 pname = "python_sat"; 20 hash = "sha256-CXyYqvm0j9GbB8WVeGC/o6rjRvJNDquaGLGGREgIfoc="; 21 }; 22 23 preBuild = '' 24 export MAKEFLAGS="-j$NIX_BUILD_CORES" 25 ''; 26 27 propagatedBuildInputs = [ 28 six 29 pypblib 30 ]; 31 32 pythonImportsCheck = [ 33 "pysat" 34 "pysat.examples" 35 "pysat.allies" 36 ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 # Due to `python -m pytest` appending the local directory to `PYTHONPATH`, 41 # importing `pysat.examples` in the tests fails. Removing the `pysat` 42 # directory fixes since then only the installed version in `$out` is 43 # imported, which has `pysat.examples` correctly installed. 44 # See https://github.com/NixOS/nixpkgs/issues/255262 45 preCheck = '' 46 rm -r pysat 47 ''; 48 49 meta = { 50 description = "Toolkit for SAT-based prototyping in Python (without optional dependencies)"; 51 homepage = "https://github.com/pysathq/pysat"; 52 changelog = "https://pysathq.github.io/updates/"; 53 license = lib.licenses.mit; 54 maintainers = [ 55 lib.maintainers.marius851000 56 lib.maintainers.chrjabs 57 ]; 58 platforms = lib.platforms.all; 59 }; 60}