1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytestCheckHook
5, pythonOlder
6, setuptools-scm
7}:
8
9buildPythonPackage rec {
10 pname = "gemfileparser2";
11 version = "0.9.3";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-BFKJZOf0W2b0YNbKIwnrmoKGvtP8A6R9PrUt7kYC/Dk=";
19 };
20
21 dontConfigure = true;
22
23 postPatch = ''
24 # https://github.com/nexB/gemfileparser2/pull/8
25 substituteInPlace setup.cfg \
26 --replace ">=3.6.*" ">=3.6"
27 '';
28
29 nativeBuildInputs = [
30 setuptools-scm
31 ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 ];
36
37 pythonImportsCheck = [
38 "gemfileparser2"
39 ];
40
41 meta = with lib; {
42 description = "Library to parse Rubygem gemspec and Gemfile files";
43 homepage = "https://github.com/nexB/gemfileparser2";
44 changelog = "https://github.com/nexB/gemfileparser2/blob/v${version}/CHANGELOG.rst";
45 license = with licenses; [ mit /* or */ gpl3Plus ];
46 maintainers = with maintainers; [ harvidsen ];
47 };
48}