Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python bindings: add Value type #17

Open
wants to merge 39 commits into
base: python-bindings
Choose a base branch
from

Commits on Feb 24, 2023

  1. ci: Always run with sandbox, even on Darwin

    And fix a test failure in the sandbox due to /home
    existing on Darwin but not being accessible in the sandbox since it's a
    symlink to /System/Volumes/Data/home, see
    https://github.com/NixOS/nix/actions/runs/4205378453/jobs/7297384658#step:6:2127:
    
        C++ exception with description "error: getting status of /home/schnitzel/darmstadt/pommes: Operation not permitted" thrown in the test body.
    
    On Linux this wasn't a problem because there /home doesn't exist in the sandbox
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    2c1d537 View commit details
    Browse the repository at this point in the history
  2. python: Initialise bindings from Pythonix

    Copies part of the tree from Pythonix at
    Mic92/pythonix@fbc8490
    into the ./python subdirectory.
    
    These Python bindings don't build yet with the current Nix version,
    which is why they're not built yet in this commit.
    
    Mic92 confirmed that he's okay with the license being changed to the Nix
    one: NixOS#7735 (comment)
    
    Co-Authored-By: Jörg Thalheim <joerg@thalheim.io>
    infinisil and Mic92 committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    ae07006 View commit details
    Browse the repository at this point in the history
  3. python: Fixes for Nix changes

    The python bindings initialised from Pythonix haven't been updated in
    some Nix versions and would not compile anymore. This commit still
    doesn't include a working python bindings build, but these are the
    Nix-update-caused changes that will be necessary for that
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    80e5b4d View commit details
    Browse the repository at this point in the history
  4. python: Integrate incremental and CI build

    Makes the python bindings build, both incrementally and for CI.
    Documentation is not yet included
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    e3020bf View commit details
    Browse the repository at this point in the history
  5. python: Fix for IFD

    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    7751140 View commit details
    Browse the repository at this point in the history
  6. python: Format using clang-format

    Using the configuration file from NixOS#6721 for less conflicts
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    afa4916 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    26cb4f0 View commit details
    Browse the repository at this point in the history
  8. python: Add exampleEnv to try out the bindings

    Will be useful for documentation
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    36a74d1 View commit details
    Browse the repository at this point in the history
  9. python: Install the bindings in hopefully the correct location

    And don't use the deprecated python3 meson module
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    e4df267 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    402a16d View commit details
    Browse the repository at this point in the history
  11. Remove .cache from .gitignore

    Not sure why I added it originally
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    47bd4a4 View commit details
    Browse the repository at this point in the history
  12. Always include config.h

    Mirroring what the main Nix build does
    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    3fab794 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2fce5fd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e11273f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    a10ae63 View commit details
    Browse the repository at this point in the history
  16. Readd .cache to .gitignore

    infinisil committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    e460074 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. Add ThrownNixError subclass

    infinisil committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    8a9d1fe View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Configuration menu
    Copy the full SHA
    6be7198 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    813cbc4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe03f3d View commit details
    Browse the repository at this point in the history
  4. Insert some TODO's

    infinisil committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    7e46ddb View commit details
    Browse the repository at this point in the history
  5. python: Handle null's in expressions correctly

    And test that null bytes currently end strings
    infinisil committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    b69d933 View commit details
    Browse the repository at this point in the history
  6. python: Fix boolean to nix conversion

    It didn't cause a problem because it converted True to 1, which still
    allowed 1 == True to succeed in Python (using assertEqual)
    infinisil committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    af8d911 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bb06d43 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cd1442a View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. python: We don't need to install the bindings into a subdirectly

    That in fact doesn't work for importing
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    1e76e28 View commit details
    Browse the repository at this point in the history
  2. Remove python from manual build again

    Using a symlink hacky and breaks in some ways
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    724d1d8 View commit details
    Browse the repository at this point in the history
  3. Very simple Nix source filtering

    So that we don't have to rebuild Nix every time the python bindings
    change
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    56a0ab0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    75696bd View commit details
    Browse the repository at this point in the history
  5. Fix some unset variable problems with vars-and-functions.sh

    - BASH_SOURCE[0] doesn't exist for evaluations under `eval`
    - NIX_STORE may not be set
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    b9dc4e4 View commit details
    Browse the repository at this point in the history
  6. assertEquals -> assertEqual

    The former is deprecated
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    090ee61 View commit details
    Browse the repository at this point in the history
  7. Alternate approach to calling init.sh

    Previously the python bindings derivation would use Nix as its source,
    call configure on that, just to extract the two files tests/init.sh and
    (the generated one) tests/common/vars-and-functions.sh
    
    The new approach is to instead have a separate derivation extracting
    these two files and having a small wrapper around them
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    22432b3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1df5ea8 View commit details
    Browse the repository at this point in the history
  9. Make buildPythonApplication test work

    Tests that the Nix bindings can be used as a Python dependency in Nix
    builds
    infinisil committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    754e342 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. Fix dev shell

    infinisil committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    29d3a70 View commit details
    Browse the repository at this point in the history
  2. Add debugging capability to dev shell

    Docs still needed
    infinisil committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    e412e35 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c87a1b4 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. python: Use global EvalState for now

    Creating a new one for each call is wasteful and doesn't scale
    to a composable interface, as the same EvalState must be used for
    operations on the same Values.
    
    Ideally we'd store EvalState in the python module, or make it a
    first class object.
    roberth committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    7cc4ac2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e7eff4 View commit details
    Browse the repository at this point in the history