#1 Tweaks to get package to build etc.
Merged 3 years ago by shaneallcroft. Opened 3 years ago by ankursinha.
neuro-sig/ ankursinha/python-pyplane feat/tweaks  into  main

file added
+68
@@ -0,0 +1,68 @@ 

+ %bcond_without tests

+ 

+ %global _description %{expand:

+ PyPlane is a free software for phase plane analysis of second order dynamical

+ systems written in PYTHON and PyQT5. Comparable to MATLAB's pplane.}

+ 

+ %global forgeurl https://github.com/TUD-RST/pyplane

+ 

+ Name:           pyplane

+ Version:        2.0.0

+ Summary:        Phase plane analysis of nonlinear systems

+ 

+ %global  tag PyPlane_v%{version}

+ %forgemeta

+ 

+ Release:        %autorelease

+ License:        GPLv3+

+ URL:            %{forgeurl}

+ Source0:        %{forgesource}

+ 

+ BuildArch:      noarch

+ 

+ BuildRequires:  python3-devel

+ %if %{with tests}

+ BuildRequires:  %{py3_dist pytest}

+ # bits not mentioned in install_requires

+ BuildRequires:  texlive-latex

+ BuildRequires:  texlive-dvipng

+ %endif

+ 

+ # Optional but readme says they improve the graphs etc., so add them as weak

+ # dependencies

+ Recommends:     texlive-latex

+ Recommends:     texlive-dvipng

+ 

+ # Add virtual provides to help users find it

+ Provides:       python3-pyplane

+ 

+ %description %_description

+ 

+ %prep

+ %forgesetup

+ 

+ %generate_buildrequires

+ # the install requirements seem to be required for tests, so include them

+ %pyproject_buildrequires %{?with_tests:-r}

+ 

+ # correct import in test script

+ sed -i -e '/sys.path.append/ d' -e 's/import core./import pyplane.core./' tests/test_core.py

+ 

+ %build

+ %pyproject_wheel

+ 

+ %install

+ %pyproject_install

+ %pyproject_save_files pyplane

+ 

+ %check

+ %if %{with tests}

+ %{pytest}

+ %endif

+ 

+ %files -f %{pyproject_files}

+ %doc README.md AUTHORS

+ %{_bindir}/pyplane

+ 

+ %changelog

+ %autochangelog

file removed
-82
@@ -1,82 +0,0 @@ 

- 

- %bcond_without tests

- 

- %global _description %{expand:

- 		       PyPlane is a free software for phase plane analysis of second order dynamical systems written in PYTHON and PyQT5. Comparable to MATLAB's pplane.}

- 

- %global forgeurl https://github.com/TUD-RST/pyplane

- %global commit e8b9b8d7bfb75aa9289c22f9ff180c1a17fb7868

- %forgemeta

- 

- Name:           python-pyplane

- Version:        1.2.0

- Release:        0.1

- Summary:        Phase plane analysis of nonlinear systems

- 

- # https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses

- License:        GPLv3

- URL:            %{forgeurl}

- Source0:        %{forgesource}

- 

- BuildArch:      noarch

- 

- 

- %description %_description

- 

- %package -n python3-pyplane

- Summary:        %{summary}

- BuildRequires:  python3-devel python3-pytest 

- BuildRequires:  python3-pytest

- BuildRequires:  matplotlib

- 

- %description -n python3-pyplane %_description

- 

- %package doc

- Summary:        Documentation for %{name}

- BuildRequires:  make matplotlib

- BuildRequires:  %{py3_dist sphinx}

- 

- %description doc

- This package provides documentation for %{name}.

- 

- 

- %prep

- %forgesetup

- 

- %generate_buildrequires

- %pyproject_buildrequires

- 

- # can also use something like this

- # %%pyproject_buildrequires -r %%{?with_tests:-x test}

- 

- 

- %build

- %pyproject_wheel

- 

- # Sometimes needed so sphinx can import the module

- #PYTHONPATH=".:.." make -C doc SPHINXBUILD=sphinx-build-3 html

- 

- 

- #rm -rf doc/_build/html/{.doctrees,.buildinfo} -vf

- 

- %install

- %pyproject_install

- %pyproject_save_files pyplane

- 

- %check

- export PYTHONPATH='%{buildroot}%{python3_sitelib}:%{buildroot}%{python3_sitelib}/pyplane'

- %if %{with tests}

- %{pytest}

- %{tox}

- %endif

- 

- # LICENSE/COPYING are included in the dist-info, so we do not need to

- # explicitly list them again

- %files -n python3-pyplane -f %{pyproject_files}

- %doc README.rst

- 

- %files doc

- %license COPYING

- %doc doc/_build/html

- 

- Add%autochangelog

I think this should be close to ready for submission now. Do run your own checks etc, and when you're ready, you can submit it (using fedora-create-review too, if you fancy it).

Pull-Request has been merged by shaneallcroft

3 years ago
Metadata