python-parse_type/python-parse_type.spec

82 lines
2.8 KiB
RPMSpec
Raw Normal View History

2019-12-16 15:03:47 +08:00
Name: python-parse_type
2023-04-12 14:56:17 +08:00
Version: 0.6.0
2022-06-28 09:27:08 +08:00
Release: 1
2019-12-16 15:03:47 +08:00
Summary: Make parse types building more easier by parse module
License: BSD
2022-06-28 09:27:08 +08:00
URL: https://github.com/jenisys/parse_type
Source0: https://github.com/jenisys/parse_type/archive/refs/tags/v%{version}.tar.gz
2019-12-16 15:03:47 +08:00
BuildArch: noarch
%{?python_enable_dependency_generator}
%description
Parse_type extends the "parse" module (opposite of string.format()") with the following
features:build type converters for common use cases (enum/mapping, choice) build a type
converter with a cardinality constraint (0..1,0..*, 1..*) from the type converter with
cardinality=1.compose a type converter from other type converters an extended parser
that supports the CardinalityField naming schema and creates missing type variants
(0..1, 0..*, 1..*) from the primary type converte.
%package -n python3-parse_type
Summary: Make parse types building more easier by parse module
%{?python_provide:%python_provide python3-parse_type}
BuildRequires: python3-devel python3-setuptools python3-six python3-parse
BuildRequires: python3-pytest python3-pytest-runner python3-sphinx >= 1.1
%description -n python3-parse_type
Parse_type extends the "parse" module (opposite of string.format()") with the following
features:build type converters for common use cases (enum/mapping, choice) build a type
converter with a cardinality constraint (0..1,0..*, 1..*) from the type converter with
cardinality=1.compose a type converter from other type converters an extended parser
that supports the CardinalityField naming schema and creates missing type variants
(0..1, 0..*, 1..*) from the primary type converte.
%prep
%setup -q -c
2020-09-11 20:56:44 +08:00
mv parse_type-%{version} python3
2020-09-11 21:22:39 +08:00
rm -rf python3/*.egg-info
2019-12-16 15:03:47 +08:00
%build
2020-09-11 20:56:44 +08:00
cd python3
2023-04-12 14:56:17 +08:00
# remove deps on pytest-html
sed -i -e '/^\s*pytest-html >= /d' tox.ini
sed -i -e '/^\s*"pytest-html >= /d' setup.py
2019-12-16 15:03:47 +08:00
%py3_build
%install
2020-09-11 20:56:44 +08:00
cd python3
2019-12-16 15:03:47 +08:00
%py3_install
%check
2020-09-11 20:56:44 +08:00
cd python3
2023-04-12 14:56:17 +08:00
sed -i \
-e '/^addopts = --metadata PACKAGE_UNDER_TEST parse_type/d' \
-e '/^ --metadata PACKAGE_VERSION [0-9].[0-9].[0-9]/d' \
-e '\% --html=build/testing/report.html --self-contained-html%d' \
-e '\% --junit-xml=build/testing/report.xml%d' \
pytest.ini
2019-12-16 15:03:47 +08:00
%{__python3} setup.py test
%files -n python3-parse_type
%doc python3/README.rst python3/LICENSE
%{python3_sitelib}/{parse_type-%{version}-*.egg-info/,parse_type/}
%changelog
2023-04-12 14:56:17 +08:00
* Wed Apr 12 2023 liyanan <thistleslyn@163.com> - 0.6.0-1
- Update to 0.6.0
2022-06-28 09:27:08 +08:00
* Thu Jun 23 2022 SimpleUpdate Robot <tc@openeuler.org> - 0.5.2-1
- Upgrade to version 0.5.2
* Thu Jan 06 2022 wangkai <wangkai385@huawei.com> - 0.4.2-4
- fix build failed for python-setuptools-59.4
2020-09-11 20:56:44 +08:00
* Fri Sep 11 2020 wangxiao <wangxiao65@huawei.com> - 0.4.2-3
- remove python2 support
2019-12-16 15:03:47 +08:00
* Fri Dec 13 2019 yanzhihua <yanzhihua4@huawei.com> - 0.4.2-2
- Package init