# Created by pyp2rpm-3.2.1 %global pypi_name myhdl Name: python-%{pypi_name} Version: 0.9.0 Release: 1%{?dist} Summary: Python as a Hardware Description Language License: LGPLv2+ URL: http://www.myhdl.org Source0: https://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python2-pytest BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: iverilog %description MyHDL is a free, open-source package for using Python as a hardware description and verification language. MyHDL turns Python into a hardware description and verification language, providing hardware engineers with the power of the Python ecosystem. %package -n python2-%{pypi_name} Summary: Python as a Hardware Description Language %{?python_provide:%python_provide python2-%{pypi_name}} # Ideally this would require ghdl too, but it conflicts with iverilog currently... Requires: iverilog %description -n python2-%{pypi_name} MyHDL is a free, open-source package for using Python as a hardware description and verification language. MyHDL turns Python into a hardware description and verification language, providing hardware engineers with the power of the Python ecosystem. %package -n python3-%{pypi_name} Summary: Python as a Hardware Description Language %{?python_provide:%python_provide python3-%{pypi_name}} # Ideally this would require ghdl too, but it conflicts with iverilog currently... Requires: iverilog %description -n python3-%{pypi_name} MyHDL is a free, open-source package for using Python as a hardware description and verification language. MyHDL turns Python into a hardware description and verification language, providing hardware engineers with the power of the Python ecosystem. %package -n python-%{pypi_name}-doc Summary: Documentation for MyHDL BuildArch: noarch %description -n python-%{pypi_name}-doc HTML documentation for MyHDL. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Remove some hidden/empty files rpmlint complains about rm -rf doc/build/html/.buildinfo rm -rf doc/build/html/_static/placeholder %build %py2_build %py3_build # Build the VVP file for Icarus Verilog. make -C cosimulation/icarus %install # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %py3_install %py2_install # Install icarus VVP file. mkdir -p %{buildroot}%{_libdir}/ivl cp -a cosimulation/icarus/myhdl.vpi %{buildroot}%{_libdir}/ivl # Get rid of other cosimulation files. rm -rf %{buildroot}%{_datadir}/myhdl %check export PYTHONPATH=$PYTHONPATH:%{buildroot}%{python2_sitelib} make -C cosimulation/icarus test # TODO: add support for ghdl too once ghdl, iverilog no longer conflict. make -C myhdl/test/bugs icarus make -C myhdl/test/conversion toVerilog toVerilog2 make -C myhdl/test/core %files -n python2-%{pypi_name} %license LICENSE.txt %doc CHANGES.txt %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{_libdir}/ivl/myhdl.vpi %files -n python3-%{pypi_name} %license LICENSE.txt %doc CHANGES.txt %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{_libdir}/ivl/myhdl.vpi %files -n python-%{pypi_name}-doc %doc doc/build/html example/ %license LICENSE.txt %changelog * Mon May 15 2017 Ben Rosser - 0.9.0-1 - Initial package.