-
Notifications
You must be signed in to change notification settings - Fork 106
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
local dependencies? #23
Comments
If i understand correctly, you are looking for a method to create a python environment from the source code of a python package. let
pkgs = import <unstable> {};
machnix_src = builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix/";
ref = "2.0.1";
};
machnix = import machnix_src;
autoPatchelfHook = import "${machnix_src}/mach_nix/nix/auto_patchelf_hook.nix" {inherit (pkgs) fetchurl makeSetupHook writeText;};
result = machnix.machNix {
requirements = builtins.readFile ./requirements.txt;
python = pkgs.python3;
};
overrides_machnix = result.overrides pkgs.pythonManylinuxPackages.manylinux1 pkgs.autoPatchelfHook;
my_python = pkgs.python3.override {
packageOverrides = overrides_machnix;
};
my_package = my_python.pkgs.buildPythonPackage {
name = "my-package";
src = ./.;
propagatedBuildInputs = result.select_pkgs my_python.pkgs;
doCheck = false;
doInstallCheck = false;
};
in
my_python.withPackages (ps: [ my_package ]) This calls |
The dev version now supports let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix/";
ref = "dev";
rev = "a5c33aec758c1ec73327915f93c92e8d80bd0c28";
});
in mach-nix.buildPythonApplication rec {
pname = "parsedmarc";
version = "lalala";
src = builtins.fetchGit{
url = "https://github.com/domainaware/parsedmarc";
ref = "master";
};
doCheck = false;
doInstallCheck = false;
requirements = builtins.readFile "${src}/requirements.txt";
} |
buildPythonApplication and buildPythonPackage are available in version 2.1.0 now |
Wondering how to do the equivalent of
python setup.py
for a local project. many thanks for this package!The text was updated successfully, but these errors were encountered: