From df75e9a419988eeee9e6245cab1de18c2ba61fd5 Mon Sep 17 00:00:00 2001 From: davisrichard437 Date: Fri, 8 Sep 2023 16:29:40 -0400 Subject: [PATCH 1/2] python310Packages.uqbar: init at 0.7.0 --- .../python-modules/uqbar/default.nix | 69 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 71 insertions(+) create mode 100644 pkgs/development/python-modules/uqbar/default.nix diff --git a/pkgs/development/python-modules/uqbar/default.nix b/pkgs/development/python-modules/uqbar/default.nix new file mode 100644 index 000000000000..e6633ab2e676 --- /dev/null +++ b/pkgs/development/python-modules/uqbar/default.nix @@ -0,0 +1,69 @@ +{ lib +, buildPythonPackage +, fetchPypi +, unidecode +, sphinx +, pythonAtLeast +, pythonOlder +, pytestCheckHook +, pytest-cov +}: + +buildPythonPackage rec { + pname = "uqbar"; + version = "0.7.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-cEhWXGtMSXVjT5QigDedjT/lwYQnVqPCE5vbctXWznk="; + }; + + propagatedBuildInputs = [ + unidecode + sphinx + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-cov + ]; + + pytestFlagsArray = [ + "tests/" + "-vv" + "-rf" + "--cov-branch" + "--cov-report=html" + "--cov-report=term" + "--doctest-modules" + ]; + + disabledTests = [ + # UnboundLocalError: local variable 'output_path' referenced before + # assignment + "test_01" + # AssertionError: assert False + "test_sphinx_book_html_cached" + # FileNotFoundError: [Errno 2] No such file or directory: 'unflatten' + "test_sphinx_style_html" + # assert not ["\x1b[91mWARNING: dot command 'dot' cannot be run (needed for + # graphviz output), check the graphviz_dot setting\x1b[39;49;00m"] + "test_sphinx_style_latex" + ] + # assert not '\x1b[91m/build/uqbar-0.7.0/tests/fake_package/enums.py:docstring + ++ lib.optional (pythonAtLeast "3.11") "test_sphinx_style"; + + pythonImportsCheck = [ "uqbar" ]; + + meta = { + description = "Tools for creating Sphinx and Graphviz documentation"; + license = lib.licenses.mit; + homepage = "https://github.com/josiah-wolf-oberholtzer/uqbar"; + changelog = + "https://github.com/josiah-wolf-oberholtzer/uqbar/releases/tag/v${version}"; + maintainers = [ lib.maintainers.davisrichard437 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index df54f262c346..4e45a97d7b1c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13440,6 +13440,8 @@ self: super: with self; { uptime-kuma-monitor = callPackage ../development/python-modules/uptime-kuma-monitor { }; + uqbar = callPackage ../development/python-modules/uqbar { }; + uranium = callPackage ../development/python-modules/uranium { }; uritemplate = callPackage ../development/python-modules/uritemplate { }; From 0f7de35e2d7d44cc1000635762116b5d8da4854f Mon Sep 17 00:00:00 2001 From: davisrichard437 Date: Fri, 8 Sep 2023 16:37:07 -0400 Subject: [PATCH 2/2] python310Packages.abjad: init at 3.19 --- .../python-modules/abjad/default.nix | 67 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/abjad/default.nix diff --git a/pkgs/development/python-modules/abjad/default.nix b/pkgs/development/python-modules/abjad/default.nix new file mode 100644 index 000000000000..3c501a029b18 --- /dev/null +++ b/pkgs/development/python-modules/abjad/default.nix @@ -0,0 +1,67 @@ +{ lib +, buildPythonPackage +, fetchPypi +, ply +, roman +, uqbar +, pythonOlder +, pytestCheckHook +, lilypond +}: + +buildPythonPackage rec { + pname = "abjad"; + version = "3.19"; + format = "setuptools"; + + disabled = pythonOlder "3.10"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-I9t3ORUKFFlMfXJsAzXhCzl1B4a9/ZNmvSX2/R44TPs="; + }; + + propagatedBuildInputs = [ + ply + roman + uqbar + ]; + + buildInputs = [ + lilypond + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace abjad/io.py \ + --replace 'lilypond_path = self.get_lilypond_path()' \ + 'lilypond_path = "${lilypond}/bin/lilypond"' + # general invocations of binary for IO purposes + + substituteInPlace abjad/configuration.py \ + --replace '["lilypond"' '["${lilypond}/bin/lilypond"' + # get_lilypond_version_string + ''; + + pythonImportsCheck = [ "abjad" ]; + + meta = { + description = "GNU LilyPond wrapper for Python"; + longDescription = '' + Abjad helps composers build up complex pieces of music notation in + iterative and incremental ways. Use Abjad to create a symbolic + representation of all the notes, rests, chords, tuplets, beams and slurs + in any score. Because Abjad extends the Python programming language, you + can use Abjad to make systematic changes to music as you work. Because + Abjad wraps the LilyPond music notation package, you can use Abjad to + control the typographic detail of symbols on the page. + ''; + license = lib.licenses.mit; + homepage = "https://abjad.github.io/"; + changelog = "https://abjad.github.io/appendices/changes.html"; + maintainers = [ lib.maintainers.davisrichard437 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4e45a97d7b1c..e9326d38c2fd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -30,6 +30,8 @@ self: super: with self; { aardwolf = callPackage ../development/python-modules/aardwolf { }; + abjad = callPackage ../development/python-modules/abjad { }; + about-time = callPackage ../development/python-modules/about-time { }; absl-py = callPackage ../development/python-modules/absl-py { };