mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-29 16:57:40 +03:00
Merge pull request #290454 from fabaff/strictdoc-fix
strictdoc: refactor
This commit is contained in:
commit
85611f8249
@ -6,31 +6,20 @@
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "strictdoc";
|
||||
version = "0.0.40";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "strictdoc-project";
|
||||
repo = pname;
|
||||
repo = "strictdoc";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-kZ8qVhroSPSGAcgUFZb1vRI6JoFyjeg/0qYosbRnwyc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace '"textx >= 3.0.0, == 3.*"' '"textx"' \
|
||||
--replace '"docutils >= 0.16, == 0.*"' '"docutils"' \
|
||||
--replace '"pygments >= 2.10.0, == 2.*"' '"pygments"' \
|
||||
--replace '"lxml >= 4.6.2, == 4.*"' '"lxml"' \
|
||||
--replace '"beautifulsoup4 >= 4.12.0, == 4.*"' '"beautifulsoup4"' \
|
||||
--replace '"python-datauri >= 0.2.9, == 0.*"' '"python-datauri"' \
|
||||
--replace '"XlsxWriter >= 1.3.7, == 1.*"' '"XlsxWriter"' \
|
||||
--replace '"xlrd >= 2.0.1, == 2.*"' '"xlrd"' \
|
||||
--replace '"reqif >= 0.0.33, == 0.*"' '"reqif"' \
|
||||
--replace '"pybtex >= 0.23.0, == 0.*"' '"pybtex"'
|
||||
'';
|
||||
pythonRelaxDeps = true;
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
hatchling
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
@ -46,16 +35,20 @@ python3.pkgs.buildPythonApplication rec {
|
||||
pygments
|
||||
python-multipart
|
||||
reqif
|
||||
selenium
|
||||
setuptools
|
||||
spdx-tools
|
||||
textx
|
||||
toml
|
||||
uvicorn
|
||||
webdriver-manager
|
||||
websockets
|
||||
xlrd
|
||||
xlsxwriter
|
||||
] ++ uvicorn.optional-dependencies.standard;
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
httpx
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
|
49
pkgs/development/python-modules/pybrowsers/default.nix
Normal file
49
pkgs/development/python-modules/pybrowsers/default.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, poetry-core
|
||||
, pythonOlder
|
||||
, pyxdg
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pybrowsers";
|
||||
version = "0.5.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "roniemartinez";
|
||||
repo = "browsers";
|
||||
rev = version;
|
||||
hash = "sha256-bsmOUa33VzqWCv2jhu6oukdRhWfpkeAM3FBjiBBwjSQ=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" pyproject.toml
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyxdg
|
||||
];
|
||||
|
||||
# Tests want to interact with actual browsers
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"browsers"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library for detecting and launching browsers";
|
||||
homepage = "https://github.com/roniemartinez/browsers";
|
||||
changelog = "https://github.com/roniemartinez/browsers/releases/tag/${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -1,38 +1,39 @@
|
||||
{ lib
|
||||
, beautifulsoup4
|
||||
, buildPythonPackage
|
||||
, python
|
||||
, fetchFromGitHub
|
||||
, hatchling
|
||||
, beautifulsoup4
|
||||
, lxml
|
||||
, jinja2
|
||||
, lxml
|
||||
, pytestCheckHook
|
||||
, python
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "reqif";
|
||||
version = "0.0.35";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "strictdoc-project";
|
||||
repo = pname;
|
||||
repo = "reqif";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-3yOLOflPqzJRv3qCQXFK3rIFftBq8FkYy7XhOfWH82Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./tests/unit/conftest.py --replace \
|
||||
"os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
|
||||
substituteInPlace ./tests/unit/conftest.py \
|
||||
--replace-fail "os.path.abspath(os.path.join(__file__, \"../../../../reqif\"))" \
|
||||
"\"${placeholder "out"}/${python.sitePackages}/reqif\""
|
||||
substituteInPlace requirements.txt --replace "==" ">="
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -41,14 +42,14 @@ buildPythonPackage rec {
|
||||
jinja2
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"reqif"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"reqif"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library for ReqIF format";
|
||||
homepage = "https://github.com/strictdoc-project/reqif";
|
||||
|
@ -0,0 +1,73 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, packaging
|
||||
, pybrowsers
|
||||
, pytestCheckHook
|
||||
, python-dotenv
|
||||
, pythonOlder
|
||||
, requests
|
||||
, selenium
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "webdriver-manager";
|
||||
version = "4.0.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SergeyPirogov";
|
||||
repo = "webdriver_manager";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-PdUlloJ4DncnktKQHofn/OLVrgSVyWhaeEEhl3Hgjek=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
packaging
|
||||
python-dotenv
|
||||
requests
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pybrowsers
|
||||
pytestCheckHook
|
||||
selenium
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"webdriver_manager"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require network access and browsers available
|
||||
"tests_negative/"
|
||||
"tests_xdist/"
|
||||
"tests/test_brave_driver.py"
|
||||
"tests/test_chrome_driver.py"
|
||||
"tests/test_chrome_driver.py"
|
||||
"tests/test_chromium_driver.py"
|
||||
"tests/test_custom_http_client.py"
|
||||
"tests/test_downloader.py"
|
||||
"tests/test_edge_driver.py"
|
||||
"tests/test_firefox_manager.py"
|
||||
"tests/test_ie_driver.py"
|
||||
"tests/test_opera_manager.py"
|
||||
"tests/test_opera_manager.py"
|
||||
"tests/test_silent_global_logs.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Module to manage the binary drivers for different browsers";
|
||||
homepage = "https://github.com/SergeyPirogov/webdriver_manager/";
|
||||
changelog = "https://github.com/SergeyPirogov/webdriver_manager/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -10255,6 +10255,8 @@ self: super: with self; {
|
||||
|
||||
pybravia = callPackage ../development/python-modules/pybravia { };
|
||||
|
||||
pybrowsers = callPackage ../development/python-modules/pybrowsers { };
|
||||
|
||||
pybrowserid = callPackage ../development/python-modules/pybrowserid { };
|
||||
|
||||
pybtex = callPackage ../development/python-modules/pybtex { };
|
||||
@ -16248,6 +16250,8 @@ self: super: with self; {
|
||||
|
||||
webdavclient3 = callPackage ../development/python-modules/webdavclient3 { };
|
||||
|
||||
webdriver-manager = callPackage ../development/python-modules/webdriver-manager { };
|
||||
|
||||
webencodings = callPackage ../development/python-modules/webencodings { };
|
||||
|
||||
webexteamssdk = callPackage ../development/python-modules/webexteamssdk { };
|
||||
|
Loading…
Reference in New Issue
Block a user