mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
Merge pull request #292160 from dotlambda/python-rapidjson-1.16
python311Packages.python-rapidjson: 1.14 -> 1.16
This commit is contained in:
commit
594b160961
@ -6,7 +6,8 @@
|
||||
, rapidjson
|
||||
, pytestCheckHook
|
||||
, pytz
|
||||
, glibcLocales
|
||||
, setuptools
|
||||
, substituteAll
|
||||
}:
|
||||
|
||||
let
|
||||
@ -25,25 +26,30 @@ let
|
||||
hash = "sha256-BjSZEwfCXA/9V+kxQ/2JPWbc26jQn35CfN8+8NW24s4=";
|
||||
})
|
||||
];
|
||||
# valgrind_unittest failed
|
||||
cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_CTEST_ARGUMENTS=-E;valgrind_unittest" ];
|
||||
});
|
||||
in buildPythonPackage rec {
|
||||
version = "1.14";
|
||||
version = "1.16";
|
||||
pname = "python-rapidjson";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-rapidjson";
|
||||
repo = "python-rapidjson";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-fCC6jYUIB89HlEnbsmL0MeCBOO4NAZtePuPgZKYxoM8=";
|
||||
hash = "sha256-4Z8cNu6tK5/yAu6b9Vb/EdXQj+fQgeT0QIszTEUurVM=";
|
||||
};
|
||||
|
||||
setupPyBuildFlags = [
|
||||
"--rj-include-dir=${lib.getDev rapidjson'}/include"
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./rapidjson-include-dir.patch;
|
||||
rapidjson = lib.getDev rapidjson';
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
@ -0,0 +1,25 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index e86b1b2..9d34d0d 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -29,19 +29,7 @@ if sys.version_info < (3, 6):
|
||||
|
||||
ROOT_PATH = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
-rj_include_dir = './rapidjson/include'
|
||||
-
|
||||
-for idx, arg in enumerate(sys.argv[:]):
|
||||
- if arg.startswith('--rj-include-dir='):
|
||||
- sys.argv.pop(idx)
|
||||
- rj_include_dir = arg.split('=', 1)[1]
|
||||
- break
|
||||
-else:
|
||||
- if not os.path.isdir(os.path.join(ROOT_PATH, 'rapidjson', 'include')):
|
||||
- raise RuntimeError("RapidJSON sources not found: if you cloned the git"
|
||||
- " repository, you should initialize the rapidjson submodule"
|
||||
- " as explained in the README.rst; in all other cases you may"
|
||||
- " want to report the issue.")
|
||||
+rj_include_dir = '@rapidjson@/include'
|
||||
|
||||
with open('version.txt', encoding='utf-8') as f:
|
||||
VERSION = f.read()
|
Loading…
Reference in New Issue
Block a user