poetry2nix: 1.12.0 -> 1.13.0
This commit is contained in:
parent
e6ec27be98
commit
0eeedc732c
|
@ -20,11 +20,58 @@ let
|
||||||
|
|
||||||
# Experimental withPlugins functionality
|
# Experimental withPlugins functionality
|
||||||
toPluginAble = (import ./plugins.nix { inherit pkgs lib; }).toPluginAble;
|
toPluginAble = (import ./plugins.nix { inherit pkgs lib; }).toPluginAble;
|
||||||
|
|
||||||
|
mkInputAttrs =
|
||||||
|
{ py
|
||||||
|
, pyProject
|
||||||
|
, attrs
|
||||||
|
, includeBuildSystem ? true
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
getInputs = attr: attrs.${attr} or [ ];
|
||||||
|
|
||||||
|
# Get dependencies and filter out depending on interpreter version
|
||||||
|
getDeps = depAttr:
|
||||||
|
let
|
||||||
|
compat = isCompatible (poetryLib.getPythonVersion py);
|
||||||
|
deps = pyProject.tool.poetry.${depAttr} or { };
|
||||||
|
depAttrs = builtins.map (d: lib.toLower d) (builtins.attrNames deps);
|
||||||
|
in
|
||||||
|
(
|
||||||
|
builtins.map
|
||||||
|
(
|
||||||
|
dep:
|
||||||
|
let
|
||||||
|
pkg = py.pkgs."${moduleName dep}";
|
||||||
|
constraints = deps.${dep}.python or "";
|
||||||
|
isCompat = compat constraints;
|
||||||
|
in
|
||||||
|
if isCompat then pkg else null
|
||||||
|
)
|
||||||
|
depAttrs
|
||||||
|
);
|
||||||
|
|
||||||
|
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
|
||||||
|
inherit pyProject;
|
||||||
|
pythonPackages = py.pkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkInput = attr: extraInputs: getInputs attr ++ extraInputs;
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
buildInputs = mkInput "buildInputs" (if includeBuildSystem then buildSystemPkgs else [ ]);
|
||||||
|
propagatedBuildInputs = mkInput "propagatedBuildInputs" (getDeps "dependencies") ++ ([ py.pkgs.setuptools ]);
|
||||||
|
nativeBuildInputs = mkInput "nativeBuildInputs" [ ];
|
||||||
|
checkInputs = mkInput "checkInputs" (getDeps "dev-dependencies");
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
in
|
in
|
||||||
lib.makeScope pkgs.newScope (self: {
|
lib.makeScope pkgs.newScope (self: {
|
||||||
|
|
||||||
# Poetry2nix version
|
# Poetry2nix version
|
||||||
version = "1.12.0";
|
version = "1.13.0";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile.
|
Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile.
|
||||||
|
@ -61,7 +108,7 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
# Filter packages by their PEP508 markers & pyproject interpreter version
|
# Filter packages by their PEP508 markers & pyproject interpreter version
|
||||||
partitions =
|
partitions =
|
||||||
let
|
let
|
||||||
supportsPythonVersion = pkgMeta: if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true;
|
supportsPythonVersion = pkgMeta: if pkgMeta ? marker then (evalPep508 pkgMeta.marker) else true && isCompatible (poetryLib.getPythonVersion python) pkgMeta.python-versions;
|
||||||
in
|
in
|
||||||
lib.partition supportsPythonVersion poetryLock.package;
|
lib.partition supportsPythonVersion poetryLock.package;
|
||||||
compatible = partitions.right;
|
compatible = partitions.right;
|
||||||
|
@ -91,7 +138,7 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
compatible
|
(lib.reverseList compatible)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
lockPkgs;
|
lockPkgs;
|
||||||
|
@ -106,9 +153,13 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
mkPoetryDep = self.callPackage ./mk-poetry-dep.nix {
|
mkPoetryDep = self.callPackage ./mk-poetry-dep.nix {
|
||||||
inherit pkgs lib python poetryLib;
|
inherit pkgs lib python poetryLib evalPep508;
|
||||||
};
|
};
|
||||||
poetry = poetryPkg;
|
|
||||||
|
# Use poetry-core from the poetry build (pep517/518 build-system)
|
||||||
|
poetry-core = if __isBootstrap then null else poetryPkg.passthru.python.pkgs.poetry-core;
|
||||||
|
poetry = if __isBootstrap then null else poetryPkg;
|
||||||
|
|
||||||
# The canonical name is setuptools-scm
|
# The canonical name is setuptools-scm
|
||||||
setuptools-scm = super.setuptools_scm;
|
setuptools-scm = super.setuptools_scm;
|
||||||
|
|
||||||
|
@ -126,10 +177,13 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
);
|
);
|
||||||
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) overlays;
|
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) overlays;
|
||||||
py = python.override { inherit packageOverrides; self = py; };
|
py = python.override { inherit packageOverrides; self = py; };
|
||||||
|
|
||||||
|
inputAttrs = mkInputAttrs { inherit py pyProject; attrs = { }; includeBuildSystem = false; };
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
python = py;
|
python = py;
|
||||||
poetryPackages = map (pkg: py.pkgs.${moduleName pkg.name}) compatible;
|
poetryPackages = builtins.foldl' (acc: v: acc ++ v) [ ] (lib.attrValues inputAttrs);
|
||||||
poetryLock = poetryLock;
|
poetryLock = poetryLock;
|
||||||
inherit pyProject;
|
inherit pyProject;
|
||||||
};
|
};
|
||||||
|
@ -219,32 +273,12 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
];
|
];
|
||||||
passedAttrs = builtins.removeAttrs attrs specialAttrs;
|
passedAttrs = builtins.removeAttrs attrs specialAttrs;
|
||||||
|
|
||||||
# Get dependencies and filter out depending on interpreter version
|
inputAttrs = mkInputAttrs { inherit py pyProject attrs; };
|
||||||
getDeps = depAttr:
|
|
||||||
let
|
|
||||||
compat = isCompatible (poetryLib.getPythonVersion py);
|
|
||||||
deps = pyProject.tool.poetry.${depAttr} or { };
|
|
||||||
depAttrs = builtins.map (d: lib.toLower d) (builtins.attrNames deps);
|
|
||||||
in
|
|
||||||
builtins.map
|
|
||||||
(
|
|
||||||
dep:
|
|
||||||
let
|
|
||||||
pkg = py.pkgs."${moduleName dep}";
|
|
||||||
constraints = deps.${dep}.python or "";
|
|
||||||
isCompat = compat constraints;
|
|
||||||
in
|
|
||||||
if isCompat then pkg else null
|
|
||||||
)
|
|
||||||
depAttrs;
|
|
||||||
getInputs = attr: attrs.${attr} or [ ];
|
|
||||||
mkInput = attr: extraInputs: getInputs attr ++ extraInputs;
|
|
||||||
buildSystemPkgs = poetryLib.getBuildSystemPkgs {
|
|
||||||
inherit pyProject;
|
|
||||||
pythonPackages = py.pkgs;
|
|
||||||
};
|
|
||||||
app = py.pkgs.buildPythonPackage (
|
app = py.pkgs.buildPythonPackage (
|
||||||
passedAttrs // {
|
passedAttrs // inputAttrs // {
|
||||||
|
nativeBuildInputs = inputAttrs.nativeBuildInputs ++ [ py.pkgs.removePathDependenciesHook ];
|
||||||
|
} // {
|
||||||
pname = moduleName pyProject.tool.poetry.name;
|
pname = moduleName pyProject.tool.poetry.name;
|
||||||
version = pyProject.tool.poetry.version;
|
version = pyProject.tool.poetry.version;
|
||||||
|
|
||||||
|
@ -256,11 +290,6 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
# provides python modules
|
# provides python modules
|
||||||
namePrefix = "";
|
namePrefix = "";
|
||||||
|
|
||||||
buildInputs = mkInput "buildInputs" buildSystemPkgs;
|
|
||||||
propagatedBuildInputs = mkInput "propagatedBuildInputs" (getDeps "dependencies") ++ ([ py.pkgs.setuptools ]);
|
|
||||||
nativeBuildInputs = mkInput "nativeBuildInputs" [ pkgs.yj py.pkgs.removePathDependenciesHook ];
|
|
||||||
checkInputs = mkInput "checkInputs" (getDeps "dev-dependencies");
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
python = py;
|
python = py;
|
||||||
dependencyEnv = (
|
dependencyEnv = (
|
||||||
|
@ -274,7 +303,8 @@ lib.makeScope pkgs.newScope (self: {
|
||||||
) { inherit app; };
|
) { inherit app; };
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = lib.optionalAttrs (lib.hasAttr "description" pyProject.tool.poetry) {
|
meta = lib.optionalAttrs (lib.hasAttr "description" pyProject.tool.poetry)
|
||||||
|
{
|
||||||
inherit (pyProject.tool.poetry) description;
|
inherit (pyProject.tool.poetry) description;
|
||||||
} // lib.optionalAttrs (lib.hasAttr "homepage" pyProject.tool.poetry) {
|
} // lib.optionalAttrs (lib.hasAttr "homepage" pyProject.tool.poetry) {
|
||||||
inherit (pyProject.tool.poetry) homepage;
|
inherit (pyProject.tool.poetry) homepage;
|
||||||
|
|
|
@ -35,7 +35,8 @@ let
|
||||||
# See https://docs.python.org/3.8/library/site.html for info on such .pth files
|
# See https://docs.python.org/3.8/library/site.html for info on such .pth files
|
||||||
# These add another site package path for each line
|
# These add another site package path for each line
|
||||||
touch poetry2nix-editable.pth
|
touch poetry2nix-editable.pth
|
||||||
${lib.concatMapStringsSep "\n" (src: ''
|
${lib.concatMapStringsSep "\n"
|
||||||
|
(src: ''
|
||||||
echo "${toString src}" >> poetry2nix-editable.pth
|
echo "${toString src}" >> poetry2nix-editable.pth
|
||||||
'')
|
'')
|
||||||
(lib.attrValues editablePackageSources)}
|
(lib.attrValues editablePackageSources)}
|
||||||
|
|
|
@ -24,7 +24,8 @@ in
|
||||||
pyprojectPatchScript = "${./pyproject-without-path.py}";
|
pyprojectPatchScript = "${./pyproject-without-path.py}";
|
||||||
};
|
};
|
||||||
} ./remove-path-dependencies.sh
|
} ./remove-path-dependencies.sh
|
||||||
) { };
|
)
|
||||||
|
{ };
|
||||||
|
|
||||||
pipBuildHook = callPackage
|
pipBuildHook = callPackage
|
||||||
(
|
(
|
||||||
|
@ -37,7 +38,8 @@ in
|
||||||
inherit pythonInterpreter pythonSitePackages;
|
inherit pythonInterpreter pythonSitePackages;
|
||||||
};
|
};
|
||||||
} ./pip-build-hook.sh
|
} ./pip-build-hook.sh
|
||||||
) { };
|
)
|
||||||
|
{ };
|
||||||
|
|
||||||
poetry2nixFixupHook = callPackage
|
poetry2nixFixupHook = callPackage
|
||||||
(
|
(
|
||||||
|
@ -47,7 +49,8 @@ in
|
||||||
name = "fixup-hook.sh";
|
name = "fixup-hook.sh";
|
||||||
deps = [ ];
|
deps = [ ];
|
||||||
} ./fixup-hook.sh
|
} ./fixup-hook.sh
|
||||||
) { };
|
)
|
||||||
|
{ };
|
||||||
|
|
||||||
# When the "wheel" package itself is a wheel the nixpkgs hook (which pulls in "wheel") leads to infinite recursion
|
# When the "wheel" package itself is a wheel the nixpkgs hook (which pulls in "wheel") leads to infinite recursion
|
||||||
# It doesn't _really_ depend on wheel though, it just copies the wheel.
|
# It doesn't _really_ depend on wheel though, it just copies the wheel.
|
||||||
|
@ -58,7 +61,8 @@ in
|
||||||
name = "wheel-unpack-hook.sh";
|
name = "wheel-unpack-hook.sh";
|
||||||
deps = [ ];
|
deps = [ ];
|
||||||
} ./wheel-unpack-hook.sh
|
} ./wheel-unpack-hook.sh
|
||||||
) { };
|
)
|
||||||
|
{ };
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,12 +156,10 @@ let
|
||||||
let
|
let
|
||||||
missingBuildBackendError = "No build-system.build-backend section in pyproject.toml. "
|
missingBuildBackendError = "No build-system.build-backend section in pyproject.toml. "
|
||||||
+ "Add such a section as described in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517";
|
+ "Add such a section as described in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517";
|
||||||
buildSystem = lib.attrByPath [ "build-system" "build-backend" ] (throw missingBuildBackendError) pyProject;
|
requires = lib.attrByPath [ "build-system" "requires" ] (throw missingBuildBackendError) pyProject;
|
||||||
drvAttr = moduleName (builtins.elemAt (builtins.split "\\.|:" buildSystem) 0);
|
requiredPkgs = builtins.map (n: lib.elemAt (builtins.match "([^!=<>~\[]+).*" n) 0) requires;
|
||||||
in
|
in
|
||||||
if buildSystem == "" then [ ] else (
|
builtins.map (drvAttr: pythonPackages.${drvAttr} or (throw "unsupported build system requirement ${drvAttr}")) requiredPkgs;
|
||||||
[ pythonPackages.${drvAttr} or (throw "unsupported build system ${buildSystem}") ]
|
|
||||||
);
|
|
||||||
|
|
||||||
# Find gitignore files recursively in parent directory stopping with .git
|
# Find gitignore files recursively in parent directory stopping with .git
|
||||||
findGitIgnores = path:
|
findGitIgnores = path:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
, lib
|
, lib
|
||||||
, python
|
, python
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pythonPackages
|
|
||||||
, poetryLib
|
, poetryLib
|
||||||
|
, evalPep508
|
||||||
}:
|
}:
|
||||||
{ name
|
{ name
|
||||||
, version
|
, version
|
||||||
|
@ -53,7 +53,9 @@ pythonPackages.callPackage
|
||||||
pyProjectPath = localDepPath + "/pyproject.toml";
|
pyProjectPath = localDepPath + "/pyproject.toml";
|
||||||
pyProject = poetryLib.readTOML pyProjectPath;
|
pyProject = poetryLib.readTOML pyProjectPath;
|
||||||
in
|
in
|
||||||
if builtins.pathExists pyProjectPath then poetryLib.getBuildSystemPkgs {
|
if builtins.pathExists pyProjectPath then
|
||||||
|
poetryLib.getBuildSystemPkgs
|
||||||
|
{
|
||||||
inherit pythonPackages pyProject;
|
inherit pythonPackages pyProject;
|
||||||
} else [ ];
|
} else [ ];
|
||||||
|
|
||||||
|
@ -127,8 +129,9 @@ pythonPackages.callPackage
|
||||||
n: v:
|
n: v:
|
||||||
let
|
let
|
||||||
constraints = v.python or "";
|
constraints = v.python or "";
|
||||||
|
pep508Markers = v.markers or "";
|
||||||
in
|
in
|
||||||
compat constraints
|
compat constraints && evalPep508 pep508Markers
|
||||||
)
|
)
|
||||||
dependencies
|
dependencies
|
||||||
);
|
);
|
||||||
|
@ -150,15 +153,18 @@ pythonPackages.callPackage
|
||||||
# Interpreters should declare what wheel types they're compatible with (python type + ABI)
|
# Interpreters should declare what wheel types they're compatible with (python type + ABI)
|
||||||
# Here we can then choose a file based on that info.
|
# Here we can then choose a file based on that info.
|
||||||
src =
|
src =
|
||||||
if isGit then (
|
if isGit then
|
||||||
|
(
|
||||||
builtins.fetchGit {
|
builtins.fetchGit {
|
||||||
inherit (source) url;
|
inherit (source) url;
|
||||||
rev = source.reference;
|
rev = source.reference;
|
||||||
ref = sourceSpec.branch or sourceSpec.rev or sourceSpec.tag or "HEAD";
|
ref = sourceSpec.branch or sourceSpec.rev or sourceSpec.tag or "HEAD";
|
||||||
}
|
}
|
||||||
) else if isLocal then (poetryLib.cleanPythonSources { src = localDepPath; }) else fetchFromPypi {
|
) else if isLocal then (poetryLib.cleanPythonSources { src = localDepPath; }) else
|
||||||
|
fetchFromPypi {
|
||||||
pname = name;
|
pname = name;
|
||||||
inherit (fileInfo) file hash kind;
|
inherit (fileInfo) file hash kind;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) { }
|
)
|
||||||
|
{ }
|
||||||
|
|
|
@ -68,9 +68,29 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
cairocffi = super.cairocffi.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
inherit (pkgs.python3.pkgs.cairocffi) patches;
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
cairosvg = super.cairosvg.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
cssselect2 = super.cssselect2.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
cffi =
|
cffi =
|
||||||
# cffi is bundled with pypy
|
# cffi is bundled with pypy
|
||||||
if self.python.implementation == "pypy" then null else (
|
if self.python.implementation == "pypy" then null else
|
||||||
|
(
|
||||||
super.cffi.overridePythonAttrs (
|
super.cffi.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
buildInputs = old.buildInputs ++ [ pkgs.libffi ];
|
||||||
|
@ -104,6 +124,13 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
dictdiffer = super.dictdiffer.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.setuptools ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
django = (
|
django = (
|
||||||
super.django.overridePythonAttrs (
|
super.django.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
|
@ -139,6 +166,24 @@ self: super:
|
||||||
# Environment markers are not always included (depending on how a dep was defined)
|
# Environment markers are not always included (depending on how a dep was defined)
|
||||||
enum34 = if self.pythonAtLeast "3.4" then null else super.enum34;
|
enum34 = if self.pythonAtLeast "3.4" then null else super.enum34;
|
||||||
|
|
||||||
|
eth-hash = super.eth-hash.overridePythonAttrs {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
eth-keyfile = super.eth-keyfile.overridePythonAttrs {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
eth-keys = super.eth-keys.overridePythonAttrs {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
faker = super.faker.overridePythonAttrs (
|
faker = super.faker.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
@ -272,6 +317,19 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# disable the removal of pyproject.toml, required because of setuptools_scm
|
||||||
|
jaraco-functools = super.jaraco-functools.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
dontPreferSetupPy = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
jsonpickle = super.jsonpickle.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
dontPreferSetupPy = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
jupyter = super.jupyter.overridePythonAttrs (
|
jupyter = super.jupyter.overridePythonAttrs (
|
||||||
old: rec {
|
old: rec {
|
||||||
# jupyter is a meta-package. Everything relevant comes from the
|
# jupyter is a meta-package. Everything relevant comes from the
|
||||||
|
@ -281,6 +339,17 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
keyring = super.keyring.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [
|
||||||
|
self.toml
|
||||||
|
];
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py --replace 'setuptools.setup()' 'setuptools.setup(version="${old.version}")'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
kiwisolver = super.kiwisolver.overridePythonAttrs (
|
kiwisolver = super.kiwisolver.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
buildInputs = old.buildInputs ++ [
|
buildInputs = old.buildInputs ++ [
|
||||||
|
@ -408,7 +477,8 @@ self: super:
|
||||||
);
|
);
|
||||||
|
|
||||||
molecule =
|
molecule =
|
||||||
if lib.versionOlder super.molecule.version "3.0.0" then (super.molecule.overridePythonAttrs (
|
if lib.versionOlder super.molecule.version "3.0.0" then
|
||||||
|
(super.molecule.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
patches = (old.patches or [ ]) ++ [
|
patches = (old.patches or [ ]) ++ [
|
||||||
# Fix build with more recent setuptools versions
|
# Fix build with more recent setuptools versions
|
||||||
|
@ -420,10 +490,21 @@ self: super:
|
||||||
];
|
];
|
||||||
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
|
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
|
||||||
}
|
}
|
||||||
)) else super.molecule.overridePythonAttrs (old: {
|
)) else
|
||||||
|
super.molecule.overridePythonAttrs (old: {
|
||||||
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
|
buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mongomock = super.mongomock.overridePythonAttrs (oa: {
|
||||||
|
buildInputs = oa.buildInputs ++ [ self.pbr ];
|
||||||
|
});
|
||||||
|
|
||||||
|
multiaddr = super.multiaddr.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
netcdf4 = super.netcdf4.overridePythonAttrs (
|
netcdf4 = super.netcdf4.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
buildInputs = old.buildInputs ++ [
|
buildInputs = old.buildInputs ++ [
|
||||||
|
@ -456,7 +537,8 @@ self: super:
|
||||||
name = "site.cfg";
|
name = "site.cfg";
|
||||||
text = (
|
text = (
|
||||||
lib.generators.toINI
|
lib.generators.toINI
|
||||||
{ } {
|
{ }
|
||||||
|
{
|
||||||
${blasImplementation} = {
|
${blasImplementation} = {
|
||||||
include_dirs = "${blas}/include";
|
include_dirs = "${blas}/include";
|
||||||
library_dirs = "${blas}/lib";
|
library_dirs = "${blas}/lib";
|
||||||
|
@ -516,6 +598,29 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
poetry-core = super.poetry-core.overridePythonAttrs (old: {
|
||||||
|
# "Vendor" dependencies (for build-system support)
|
||||||
|
postPatch = ''
|
||||||
|
echo "import sys" >> poetry/__init__.py
|
||||||
|
for path in ''${PYTHONPATH//:/ }; do echo $path; done | uniq | while read path; do
|
||||||
|
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Propagating dependencies leads to issues downstream
|
||||||
|
# We've already patched poetry to prefer "vendored" dependencies
|
||||||
|
postFixup = ''
|
||||||
|
rm $out/nix-support/propagated-build-inputs
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
# disable the removal of pyproject.toml, required because of setuptools_scm
|
||||||
|
portend = super.portend.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
dontPreferSetupPy = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
psycopg2 = super.psycopg2.overridePythonAttrs (
|
psycopg2 = super.psycopg2.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
buildInputs = old.buildInputs
|
buildInputs = old.buildInputs
|
||||||
|
@ -533,7 +638,9 @@ self: super:
|
||||||
);
|
);
|
||||||
|
|
||||||
pyarrow =
|
pyarrow =
|
||||||
if lib.versionAtLeast super.pyarrow.version "0.16.0" then super.pyarrow.overridePythonAttrs (
|
if lib.versionAtLeast super.pyarrow.version "0.16.0" then
|
||||||
|
super.pyarrow.overridePythonAttrs
|
||||||
|
(
|
||||||
old:
|
old:
|
||||||
let
|
let
|
||||||
parseMinor = drv: lib.concatStringsSep "." (lib.take 2 (lib.splitVersion drv.version));
|
parseMinor = drv: lib.concatStringsSep "." (lib.take 2 (lib.splitVersion drv.version));
|
||||||
|
@ -542,7 +649,8 @@ self: super:
|
||||||
# instead of "python". Below we inspect function arguments to maintain compatibilitiy.
|
# instead of "python". Below we inspect function arguments to maintain compatibilitiy.
|
||||||
_arrow-cpp = pkgs.arrow-cpp.override (
|
_arrow-cpp = pkgs.arrow-cpp.override (
|
||||||
builtins.intersectAttrs
|
builtins.intersectAttrs
|
||||||
(lib.functionArgs pkgs.arrow-cpp.override) { python = self.python; python3 = self.python; }
|
(lib.functionArgs pkgs.arrow-cpp.override)
|
||||||
|
{ python = self.python; python3 = self.python; }
|
||||||
);
|
);
|
||||||
|
|
||||||
ARROW_HOME = _arrow-cpp;
|
ARROW_HOME = _arrow-cpp;
|
||||||
|
@ -581,7 +689,8 @@ self: super:
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
dontUseCmakeConfigure = true;
|
||||||
}
|
}
|
||||||
) else super.pyarrow.overridePythonAttrs (
|
) else
|
||||||
|
super.pyarrow.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
nativeBuildInputs = old.nativeBuildInputs ++ [
|
||||||
self.cython
|
self.cython
|
||||||
|
@ -653,12 +762,14 @@ self: super:
|
||||||
-e "/'\/lib\/i386-linux-gnu', '\/lib\/x86_64-linux-gnu']/d" \
|
-e "/'\/lib\/i386-linux-gnu', '\/lib\/x86_64-linux-gnu']/d" \
|
||||||
-e "/\/include\/smpeg/d" \
|
-e "/\/include\/smpeg/d" \
|
||||||
-i buildconfig/config_unix.py
|
-i buildconfig/config_unix.py
|
||||||
${lib.concatMapStrings (dep: ''
|
${lib.concatMapStrings
|
||||||
|
(dep: ''
|
||||||
sed \
|
sed \
|
||||||
-e "/origincdirs =/a\ origincdirs += ['${lib.getDev dep}/include']" \
|
-e "/origincdirs =/a\ origincdirs += ['${lib.getDev dep}/include']" \
|
||||||
-e "/origlibdirs =/a\ origlibdirs += ['${lib.getLib dep}/lib']" \
|
-e "/origlibdirs =/a\ origlibdirs += ['${lib.getLib dep}/lib']" \
|
||||||
-i buildconfig/config_unix.py
|
-i buildconfig/config_unix.py
|
||||||
'') buildInputs
|
'')
|
||||||
|
buildInputs
|
||||||
}
|
}
|
||||||
LOCALBASE=/ ${self.python.interpreter} buildconfig/config.py
|
LOCALBASE=/ ${self.python.interpreter} buildconfig/config.py
|
||||||
'';
|
'';
|
||||||
|
@ -884,6 +995,12 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
rlp = super.rlp.overridePythonAttrs {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
scipy = super.scipy.overridePythonAttrs (
|
scipy = super.scipy.overridePythonAttrs (
|
||||||
old:
|
old:
|
||||||
if old.format != "wheel" then {
|
if old.format != "wheel" then {
|
||||||
|
@ -927,7 +1044,8 @@ self: super:
|
||||||
);
|
);
|
||||||
|
|
||||||
shellingham =
|
shellingham =
|
||||||
if lib.versionAtLeast super.shellingham.version "1.3.2" then (
|
if lib.versionAtLeast super.shellingham.version "1.3.2" then
|
||||||
|
(
|
||||||
super.shellingham.overridePythonAttrs (
|
super.shellingham.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
@ -943,6 +1061,13 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# disable the removal of pyproject.toml, required because of setuptools_scm
|
||||||
|
tempora = super.tempora.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
dontPreferSetupPy = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
tensorflow = super.tensorflow.overridePythonAttrs (
|
tensorflow = super.tensorflow.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -959,6 +1084,12 @@ self: super:
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tinycss2 = super.tinycss2.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
# nix uses a dash, poetry uses an underscore
|
# nix uses a dash, poetry uses an underscore
|
||||||
typing_extensions = super.typing_extensions or self.typing-extensions;
|
typing_extensions = super.typing_extensions or self.typing-extensions;
|
||||||
|
|
||||||
|
@ -1004,6 +1135,20 @@ self: super:
|
||||||
python = self.python;
|
python = self.python;
|
||||||
}).wheel;
|
}).wheel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
weasyprint = super.weasyprint.overridePythonAttrs (
|
||||||
|
old: {
|
||||||
|
inherit (pkgs.python3.pkgs.weasyprint) patches;
|
||||||
|
buildInputs = old.buildInputs ++ [ self.pytest-runner ];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
web3 = super.web3.overridePythonAttrs {
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace setup.py --replace \'setuptools-markdown\' ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
wheel =
|
wheel =
|
||||||
let
|
let
|
||||||
isWheel = super.wheel.src.isWheel or false;
|
isWheel = super.wheel.src.isWheel or false;
|
||||||
|
@ -1026,9 +1171,10 @@ self: super:
|
||||||
in
|
in
|
||||||
if isWheel then wheelPackage else sourcePackage;
|
if isWheel then wheelPackage else sourcePackage;
|
||||||
|
|
||||||
zipp =
|
zipp = if super.zipp == null then null else
|
||||||
|
(
|
||||||
|
if lib.versionAtLeast super.zipp.version "2.0.0" then
|
||||||
(
|
(
|
||||||
if lib.versionAtLeast super.zipp.version "2.0.0" then (
|
|
||||||
super.zipp.overridePythonAttrs (
|
super.zipp.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
|
|
|
@ -71,7 +71,8 @@ let
|
||||||
withPython = ver: abi: x: (isPyVersionCompatible ver x.pyVer) && (isPyAbiCompatible abi x.abi);
|
withPython = ver: abi: x: (isPyVersionCompatible ver x.pyVer) && (isPyAbiCompatible abi x.abi);
|
||||||
withPlatform =
|
withPlatform =
|
||||||
if isLinux
|
if isLinux
|
||||||
then (
|
then
|
||||||
|
(
|
||||||
x: x.platform == "manylinux1_${stdenv.platform.kernelArch}"
|
x: x.platform == "manylinux1_${stdenv.platform.kernelArch}"
|
||||||
|| x.platform == "manylinux2010_${stdenv.platform.kernelArch}"
|
|| x.platform == "manylinux2010_${stdenv.platform.kernelArch}"
|
||||||
|| x.platform == "manylinux2014_${stdenv.platform.kernelArch}"
|
|| x.platform == "manylinux2014_${stdenv.platform.kernelArch}"
|
||||||
|
|
|
@ -8,7 +8,8 @@ let
|
||||||
# Strip leading/trailing whitespace from string
|
# Strip leading/trailing whitespace from string
|
||||||
stripStr = s: lib.elemAt (builtins.split "^ *" (lib.elemAt (builtins.split " *$" s) 0)) 2;
|
stripStr = s: lib.elemAt (builtins.split "^ *" (lib.elemAt (builtins.split " *$" s) 0)) 2;
|
||||||
findSubExpressionsFun = acc: c: (
|
findSubExpressionsFun = acc: c: (
|
||||||
if c == "(" then (
|
if c == "(" then
|
||||||
|
(
|
||||||
let
|
let
|
||||||
posNew = acc.pos + 1;
|
posNew = acc.pos + 1;
|
||||||
isOpen = acc.openP == 0;
|
isOpen = acc.openP == 0;
|
||||||
|
@ -20,7 +21,8 @@ let
|
||||||
pos = posNew;
|
pos = posNew;
|
||||||
openP = acc.openP + 1;
|
openP = acc.openP + 1;
|
||||||
}
|
}
|
||||||
) else if c == ")" then (
|
) else if c == ")" then
|
||||||
|
(
|
||||||
let
|
let
|
||||||
openP = acc.openP - 1;
|
openP = acc.openP - 1;
|
||||||
exprs = findSubExpressions (substr acc.startPos acc.pos acc.expr);
|
exprs = findSubExpressions (substr acc.startPos acc.pos acc.expr);
|
||||||
|
@ -35,8 +37,9 @@ let
|
||||||
);
|
);
|
||||||
|
|
||||||
# Make a tree out of expression groups (parens)
|
# Make a tree out of expression groups (parens)
|
||||||
findSubExpressions = expr:
|
findSubExpressions = expr':
|
||||||
let
|
let
|
||||||
|
expr = " " + expr';
|
||||||
acc = builtins.foldl'
|
acc = builtins.foldl'
|
||||||
findSubExpressionsFun
|
findSubExpressionsFun
|
||||||
{
|
{
|
||||||
|
@ -113,7 +116,7 @@ let
|
||||||
python_full_version = python.version;
|
python_full_version = python.version;
|
||||||
implementation_name = python.implementation;
|
implementation_name = python.implementation;
|
||||||
implementation_version = python.version;
|
implementation_version = python.version;
|
||||||
extra = "";
|
# extra = "";
|
||||||
};
|
};
|
||||||
substituteVar = value: if builtins.hasAttr value variables then (builtins.toJSON variables."${value}") else value;
|
substituteVar = value: if builtins.hasAttr value variables then (builtins.toJSON variables."${value}") else value;
|
||||||
processVar = value: builtins.foldl' (acc: v: v acc) value [
|
processVar = value: builtins.foldl' (acc: v: v acc) value [
|
||||||
|
@ -121,22 +124,24 @@ let
|
||||||
substituteVar
|
substituteVar
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
if builtins.typeOf exprs == "set" then (
|
if builtins.typeOf exprs == "set" then
|
||||||
if exprs.type == "expr" then (
|
(
|
||||||
|
if exprs.type == "expr" then
|
||||||
|
(
|
||||||
let
|
let
|
||||||
mVal = ''[a-zA-Z0-9\'"_\. ]+'';
|
mVal = ''[a-zA-Z0-9\'"_\. ]+'';
|
||||||
mOp = "in|[!=<>]+";
|
mOp = "in|[!=<>]+";
|
||||||
e = stripStr exprs.value;
|
e = stripStr exprs.value;
|
||||||
m = builtins.map stripStr (builtins.match ''^(${mVal}) *(${mOp}) *(${mVal})$'' e);
|
m = builtins.map stripStr (builtins.match ''^(${mVal}) *(${mOp}) *(${mVal})$'' e);
|
||||||
|
m0 = processVar (builtins.elemAt m 0);
|
||||||
|
m2 = processVar (builtins.elemAt m 2);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
type = "expr";
|
type = "expr";
|
||||||
value = {
|
value = {
|
||||||
op = builtins.elemAt m 1;
|
# HACK: We don't know extra at eval time, so we assume the expression is always true
|
||||||
values = [
|
op = if m0 == "extra" then "true" else builtins.elemAt m 1;
|
||||||
(processVar (builtins.elemAt m 0))
|
values = [ m0 m2 ];
|
||||||
(processVar (builtins.elemAt m 2))
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) else exprs
|
) else exprs
|
||||||
|
@ -153,6 +158,7 @@ let
|
||||||
);
|
);
|
||||||
hasElem = needle: haystack: builtins.elem needle (builtins.filter (x: builtins.typeOf x == "string") (builtins.split " " haystack));
|
hasElem = needle: haystack: builtins.elem needle (builtins.filter (x: builtins.typeOf x == "string") (builtins.split " " haystack));
|
||||||
op = {
|
op = {
|
||||||
|
"true" = x: y: true;
|
||||||
"<=" = x: y: (unmarshal x) <= (unmarshal y);
|
"<=" = x: y: (unmarshal x) <= (unmarshal y);
|
||||||
"<" = x: y: (unmarshal x) < (unmarshal y);
|
"<" = x: y: (unmarshal x) < (unmarshal y);
|
||||||
"!=" = x: y: x != y;
|
"!=" = x: y: x != y;
|
||||||
|
@ -177,8 +183,10 @@ let
|
||||||
builtins.elem (unmarshal x) values;
|
builtins.elem (unmarshal x) values;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if builtins.typeOf exprs == "set" then (
|
if builtins.typeOf exprs == "set" then
|
||||||
if exprs.type == "expr" then (
|
(
|
||||||
|
if exprs.type == "expr" then
|
||||||
|
(
|
||||||
let
|
let
|
||||||
expr = exprs;
|
expr = exprs;
|
||||||
result = (op."${expr.value.op}") (builtins.elemAt expr.value.values 0) (builtins.elemAt expr.value.values 1);
|
result = (op."${expr.value.op}") (builtins.elemAt expr.value.values 0) (builtins.elemAt expr.value.values 1);
|
||||||
|
@ -198,17 +206,21 @@ let
|
||||||
"or" = x: y: x || y;
|
"or" = x: y: x || y;
|
||||||
};
|
};
|
||||||
reduceExpressionsFun = acc: v: (
|
reduceExpressionsFun = acc: v: (
|
||||||
if builtins.typeOf v == "set" then (
|
if builtins.typeOf v == "set" then
|
||||||
if v.type == "value" then (
|
(
|
||||||
|
if v.type == "value" then
|
||||||
|
(
|
||||||
acc // {
|
acc // {
|
||||||
value = cond."${acc.cond}" acc.value v.value;
|
value = cond."${acc.cond}" acc.value v.value;
|
||||||
}
|
}
|
||||||
) else if v.type == "bool" then (
|
) else if v.type == "bool" then
|
||||||
|
(
|
||||||
acc // {
|
acc // {
|
||||||
cond = v.value;
|
cond = v.value;
|
||||||
}
|
}
|
||||||
) else throw "Unsupported type"
|
) else throw "Unsupported type"
|
||||||
) else if builtins.typeOf v == "list" then (
|
) else if builtins.typeOf v == "list" then
|
||||||
|
(
|
||||||
let
|
let
|
||||||
ret = builtins.foldl'
|
ret = builtins.foldl'
|
||||||
reduceExpressionsFun
|
reduceExpressionsFun
|
||||||
|
|
|
@ -14,12 +14,18 @@ poetry2nix.mkPoetryApplication {
|
||||||
|
|
||||||
# "Vendor" dependencies (for build-system support)
|
# "Vendor" dependencies (for build-system support)
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
echo "import sys" >> poetry/__init__.py
|
||||||
for path in ''${PYTHONPATH//:/ }; do echo $path; done | uniq | while read path; do
|
for path in ''${PYTHONPATH//:/ }; do echo $path; done | uniq | while read path; do
|
||||||
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
|
echo "sys.path.insert(0, \"$path\")" >> poetry/__init__.py
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
# Figure out the location of poetry.core
|
||||||
|
# As poetry.core is using the same root import name as the poetry package and the python module system wont look for the root
|
||||||
|
# in the separate second location we need to link poetry.core to poetry
|
||||||
|
ln -s $(python -c 'import poetry.core; import os.path; print(os.path.dirname(poetry.core.__file__))') $out/${python.sitePackages}/poetry/core
|
||||||
|
|
||||||
mkdir -p "$out/share/bash-completion/completions"
|
mkdir -p "$out/share/bash-completion/completions"
|
||||||
"$out/bin/poetry" completions bash > "$out/share/bash-completion/completions/poetry"
|
"$out/bin/poetry" completions bash > "$out/share/bash-completion/completions/poetry"
|
||||||
mkdir -p "$out/share/zsh/vendor-completions"
|
mkdir -p "$out/share/zsh/vendor-completions"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "poetry"
|
name = "poetry"
|
||||||
version = "1.0.10"
|
version = "1.1.0"
|
||||||
description = "Python dependency management and packaging made easy."
|
description = "Python dependency management and packaging made easy."
|
||||||
authors = [
|
authors = [
|
||||||
"Sébastien Eustace <sebastien@eustace.io>"
|
"Sébastien Eustace <sebastien@eustace.io>"
|
||||||
|
@ -22,40 +22,43 @@ classifiers = [
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "~2.7 || ^3.4"
|
python = "~2.7 || ^3.5"
|
||||||
cleo = "^0.7.6"
|
|
||||||
clikit = "^0.4.2"
|
poetry-core = "^1.0.0"
|
||||||
|
cleo = "^0.8.1"
|
||||||
|
clikit = "^0.6.2"
|
||||||
|
crashtest = { version = "^0.3.0", python = "^3.6" }
|
||||||
requests = "^2.18"
|
requests = "^2.18"
|
||||||
cachy = "^0.3.0"
|
cachy = "^0.3.0"
|
||||||
requests-toolbelt = "^0.8.0"
|
requests-toolbelt = "^0.9.1"
|
||||||
jsonschema = "^3.1"
|
|
||||||
pyrsistent = "^0.14.2"
|
|
||||||
pyparsing = "^2.2"
|
|
||||||
cachecontrol = { version = "^0.12.4", extras = ["filecache"] }
|
cachecontrol = { version = "^0.12.4", extras = ["filecache"] }
|
||||||
pkginfo = "^1.4"
|
pkginfo = "^1.4"
|
||||||
html5lib = "^1.0"
|
html5lib = "^1.0"
|
||||||
shellingham = "^1.1"
|
shellingham = "^1.1"
|
||||||
tomlkit = "^0.5.11"
|
tomlkit = ">=0.7.0,<1.0.0"
|
||||||
pexpect = "^4.7.0"
|
pexpect = "^4.7.0"
|
||||||
|
packaging = "^20.4"
|
||||||
|
virtualenv = { version = "^20.0.26" }
|
||||||
|
|
||||||
# The typing module is not in the stdlib in Python 2.7 and 3.4
|
# The typing module is not in the stdlib in Python 2.7
|
||||||
typing = { version = "^3.6", python = "~2.7 || ~3.4" }
|
typing = { version = "^3.6", python = "~2.7" }
|
||||||
|
|
||||||
# Use pathlib2 for Python 2.7 and 3.4
|
# Use pathlib2 for Python 2.7
|
||||||
pathlib2 = { version = "^2.3", python = "~2.7 || ~3.4" }
|
pathlib2 = { version = "^2.3", python = "~2.7" }
|
||||||
|
# Use futures on Python 2.7
|
||||||
|
futures = { version = "^3.3.0", python = "~2.7" }
|
||||||
# Use glob2 for Python 2.7 and 3.4
|
# Use glob2 for Python 2.7 and 3.4
|
||||||
glob2 = { version = "^0.6", python = "~2.7 || ~3.4" }
|
glob2 = { version = "^0.6", python = "~2.7" }
|
||||||
# Use virtualenv for Python 2.7 since venv does not exist
|
|
||||||
virtualenv = { version = "^16.7.9", python = "~2.7" }
|
|
||||||
# functools32 is needed for Python 2.7
|
# functools32 is needed for Python 2.7
|
||||||
functools32 = { version = "^3.2.3", python = "~2.7" }
|
functools32 = { version = "^3.2.3", python = "~2.7" }
|
||||||
keyring = [
|
keyring = [
|
||||||
{ version = "^18.0.1", python = "~2.7 || ~3.4" },
|
{ version = "^18.0.1", python = "~2.7" },
|
||||||
{ version = "^20.0.1", python = "^3.5" }
|
{ version = "^20.0.1", python = "~3.5" },
|
||||||
|
{ version = "^21.2.0", python = "^3.6" }
|
||||||
]
|
]
|
||||||
# Use subprocess32 for Python 2.7 and 3.4
|
# Use subprocess32 for Python 2.7
|
||||||
subprocess32 = { version = "^3.5", python = "~2.7 || ~3.4" }
|
subprocess32 = { version = "^3.5", python = "~2.7" }
|
||||||
importlib-metadata = {version = "~1.1.3", python = "<3.8"}
|
importlib-metadata = {version = "^1.6.0", python = "<3.8"}
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
pytest = [
|
pytest = [
|
||||||
|
@ -63,62 +66,33 @@ pytest = [
|
||||||
{version = "^5.4.3", python = ">=3.5"}
|
{version = "^5.4.3", python = ">=3.5"}
|
||||||
]
|
]
|
||||||
pytest-cov = "^2.5"
|
pytest-cov = "^2.5"
|
||||||
mkdocs = { version = "^1.0", python = "~2.7.9 || ^3.4" }
|
|
||||||
pymdown-extensions = "^6.0"
|
|
||||||
pygments = "^2.2"
|
|
||||||
pytest-mock = "^1.9"
|
pytest-mock = "^1.9"
|
||||||
pygments-github-lexers = "^0.0.5"
|
pre-commit = { version = "^2.6", python = "^3.6.1" }
|
||||||
black = { version = "^19.10b0", python = "^3.6" }
|
|
||||||
pre-commit = "^1.10"
|
|
||||||
tox = "^3.0"
|
tox = "^3.0"
|
||||||
pytest-sugar = "^0.9.2"
|
pytest-sugar = "^0.9.2"
|
||||||
httpretty = "^0.9.6"
|
httpretty = "^0.9.6"
|
||||||
markdown-include = "^0.5.1"
|
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
poetry = "poetry.console:main"
|
poetry = "poetry.console:main"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["intreehooks"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
build-backend = "intreehooks:loader"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.intreehooks]
|
|
||||||
build-backend = "poetry.masonry.api"
|
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
line_length = 88
|
profile = "black"
|
||||||
force_single_line = true
|
force_single_line = true
|
||||||
atomic = true
|
atomic = true
|
||||||
include_trailing_comma = true
|
include_trailing_comma = true
|
||||||
lines_after_imports = 2
|
lines_after_imports = 2
|
||||||
lines_between_types = 1
|
lines_between_types = 1
|
||||||
multi_line_output = 3
|
|
||||||
use_parentheses = true
|
use_parentheses = true
|
||||||
not_skip = "__init__.py"
|
src_paths = ["poetry", "tests"]
|
||||||
skip_glob = ["*/setup.py"]
|
skip_glob = ["*/setup.py"]
|
||||||
filter_files = true
|
filter_files = true
|
||||||
|
|
||||||
known_first_party = "poetry"
|
known_first_party = "poetry"
|
||||||
known_third_party = [
|
|
||||||
"cachecontrol",
|
|
||||||
"cachy",
|
|
||||||
"cleo",
|
|
||||||
"clikit",
|
|
||||||
"html5lib",
|
|
||||||
"httpretty",
|
|
||||||
"jsonschema",
|
|
||||||
"keyring",
|
|
||||||
"pexpect",
|
|
||||||
"pkginfo",
|
|
||||||
"pyparsing",
|
|
||||||
"pytest",
|
|
||||||
"requests",
|
|
||||||
"requests_toolbelt",
|
|
||||||
"shellingham",
|
|
||||||
"tomlkit",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"owner": "python-poetry",
|
"owner": "python-poetry",
|
||||||
"repo": "poetry",
|
"repo": "poetry",
|
||||||
"rev": "d3c9049a18ae33baacfcb5c698777282f2f58128",
|
"rev": "539d7f732c34c821258a9853cd3078cbda34a717",
|
||||||
"sha256": "00qfzjjs6clh93gfl1px3ma9km8qxl3f4z819nmyl58zc8ni3zyv"
|
"sha256": "0kl23dkq9n112z1pqjg6f1wv3qk77ij6q5glg15lwrj7yrl9k65c",
|
||||||
|
"fetchSubmodules": true
|
||||||
}
|
}
|
Loading…
Reference in New Issue