加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rust-packaging.spec 2.95 KB
一键复制 编辑 原始数据 按行查看 历史
desert-sailor 提交于 2023-07-18 09:37 . Upgrade to version 23
%{?python_enable_dependency_generator}
# https://pagure.io/koji/issue/659
%global debug_package %{nil}
Name: rust-packaging
Version: 23
Release: 1
Summary: RPM macros for building Rust packages on various architectures
License: MIT
URL: https://pagure.io/fedora-rust/rust2rpm
Source: https://pagure.io/fedora-rust/rust2rpm/archive/v%{version}/rust2rpm-v%{version}.tar.gz
Patch1: 0001-remove-test-spec-with-opensuse-tomlfile.patch
BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-pbr python3-pip python3-wheel
BuildRequires: python3-hatchling python3-virtualenv
# use for check
BuildRequires: python3-pytest cargo python3-semantic_version
BuildRequires: python3-tox-current-env
BuildRequires: python3-termcolor python3-jinja2
BuildRequires: python3-pyparsing python3-tqdm python3-requests
# gawk is needed for stripping dev-deps in macro
Requires: gawk python3-rust2rpm = %{version}-%{release}
Requires: rust-srpm-macros rust cargo
%description
The package provides macros for building projects in Rust
on various architectures.
%package -n python3-rust2rpm
Summary: Convert Rust packages to RPM
Requires: cargo
Provides: rust2rpm = %{version}-%{release}
%{?python_provide:%python_provide python3-rust2rpm}
%description -n python3-rust2rpm
Convert Rust packages to RPM.
%prep
%autosetup -n rust2rpm-v%{version} -p1
%build
%pyproject_build
%install
%pyproject_install
install -D -p -m 0644 -t %{buildroot}%{_rpmmacrodir} data/macros.rust data/macros.cargo
install -D -p -m 0644 -t %{buildroot}%{_fileattrsdir} data/cargo.attr
%check
TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
PATH="%{buildroot}%{_bindir}:$PATH" \
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
PYTHONDONTWRITEBYTECODE=1 \
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
%{__python3} -m tox -e py%{python3_version_nodots} --current-env
%files
%defattr(-,root,root)
%license LICENSE
%{_rpmmacrodir}/macros.rust
%{_rpmmacrodir}/macros.cargo
%{_fileattrsdir}/cargo.attr
%files -n python3-rust2rpm
%defattr(-,root,root)
%license LICENSE
%{_bindir}/rust2rpm
%{_bindir}/cargo-inspector
%{python3_sitelib}/rust2rpm/
%{python3_sitelib}/rust2rpm-*.dist-info/
%changelog
* Tue Jul 18 2023 Dongxing Wang <dxwangk@isoftstone.com> - 23-1
- update to 23
* Sat Aug 06 2022 tianlijing <tianlijing@kylinos.cn> - 21-1
- update to 21
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 20-1
- Upgrade to version 20
* Thu Mar 18 2021 shixuantong <shixuantong@huawei.com> - 15-2
- fix install fail issue because nothing provides rust-srpm-macros = 15
* Tue Feb 02 2021 shixuantong <shixuantong@huawei.com> - 15-1
- Upgrade to version 15
* Wed Mar 4 2020 hexiujun <hexiujun1@huawei.com> - 10-1
- Package init
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化