Blob Blame History Raw
# Generated by rust2rpm 23
%bcond_without check
%global debug_package %{nil}

%global crate python3-sys

Name:           rust-python3-sys
Version:        0.7.1
Release:        %autorelease
Summary:        FFI Declarations for Python 3

License:        Python-2.0
URL:            https://crates.io/crates/python3-sys
Source:         %{crates_source}

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
FFI Declarations for Python 3.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%package     -n %{name}+default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+extension-module-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+extension-module-devel %{_description}

This package contains library source intended for building other packages which
use the "extension-module" feature of the "%{crate}" crate.

%files       -n %{name}+extension-module-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+link-mode-default-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+link-mode-default-devel %{_description}

This package contains library source intended for building other packages which
use the "link-mode-default" feature of the "%{crate}" crate.

%files       -n %{name}+link-mode-default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+link-mode-unresolved-static-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+link-mode-unresolved-static-devel %{_description}

This package contains library source intended for building other packages which
use the "link-mode-unresolved-static" feature of the "%{crate}" crate.

%files       -n %{name}+link-mode-unresolved-static-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+pep-384-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+pep-384-devel %{_description}

This package contains library source intended for building other packages which
use the "pep-384" feature of the "%{crate}" crate.

%files       -n %{name}+pep-384-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.3

%description -n %{name}+python-3-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-10-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.10

%description -n %{name}+python-3-10-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-10" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-10-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-11-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.11

%description -n %{name}+python-3-11-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-11" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-11-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-4-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.4

%description -n %{name}+python-3-4-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-4" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-4-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-5-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.5

%description -n %{name}+python-3-5-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-5" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-5-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-6-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.6

%description -n %{name}+python-3-6-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-6" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-6-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-7-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.7

%description -n %{name}+python-3-7-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-7" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-7-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-8-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.8

%description -n %{name}+python-3-8-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-8" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-8-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+python-3-9-devel
Summary:        %{summary}
BuildArch:      noarch
Requires:       python3-devel >= 3.9

%description -n %{name}+python-3-9-devel %{_description}

This package contains library source intended for building other packages which
use the "python-3-9" feature of the "%{crate}" crate.

%files       -n %{name}+python-3-9-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
# remove executable bit from all files
find -type f -executable -exec chmod -x {} +

%generate_buildrequires
%cargo_generate_buildrequires
echo 'python3-devel >= 3.3'

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%changelog
%autochangelog