diff --git a/.gitignore b/.gitignore index a49cb172..d360dcc6 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ var/ # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest -*.spec # Installer logs pip-log.txt diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..340b5c55 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +.PHONY: build install dist sources srpm clean + +PYTHON := python +PROGRAM := pytest-asyncio +PACKAGE := python-$(PROGRAM) +VERSION := $(shell sed -n s/[[:space:]]*Version:[[:space:]]*//p $(PACKAGE).spec) + + +build: + $(PYTHON) setup.py build + +install: + $(PYTHON) setup.py install --skip-build + +dist: clean + $(PYTHON) setup.py sdist + +sources: clean + @git archive --format=tar --prefix="$(PROGRAM)-$(VERSION)/" \ + $(shell git rev-parse --verify HEAD) | gzip > "$(PROGRAM)-$(VERSION).tar.gz" + +srpm: sources + rpmbuild -bs --define "_sourcedir $(CURDIR)" \ + --define "_srcrpmdir $(CURDIR)" $(PACKAGE).spec + +clean: + @rm -rf build dist $(PROGRAM).egg-info $(PROGRAM)-*.tar.gz *.egg *.src.rpm \ No newline at end of file diff --git a/python-pytest-asyncio.spec b/python-pytest-asyncio.spec new file mode 100644 index 00000000..a723462b --- /dev/null +++ b/python-pytest-asyncio.spec @@ -0,0 +1,58 @@ +%define pkgname pytest-asyncio +%global sum Pytest support for asyncio +%global descr Pytest support for asyncio + +Name: python-%{pkgname} +Summary: %{sum} +Version: 0.9.0 +Release: CROC1%{?dist} +License: Apache License, Version 2.0 + +Group: Development/Testing +URL: https://github.com/pytest-dev/pytest-asyncio +Source0: %{pkgname}-%{version}.tar.gz + + +BuildArch: noarch + +%description +%{descr} + + +%package -n python%{python3_pkgversion}-%{pkgname} +Summary: %{sum} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools + +%description -n python%{python3_pkgversion}-%{pkgname} +%{descr} + + +%prep +%setup -q -n %{pkgname}-%{version} + + +%build +%py3_build + + +%install +[ %buildroot = "/" ] || rm -rf %buildroot + +%py3_install + + + +%clean +rm -rf %{buildroot} + + +%files -n python%{python3_pkgversion}-%{pkgname} +%defattr(-,root,root,-) +%{python3_sitelib}/* + +%doc README.rst LICENSE + +%changelog +* Thu Dec 03 2020 Andrey Kulaev 0.9.0-1 +- Initial build. diff --git a/setup.py b/setup.py index 2c26c42b..a5bd2d9d 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def find_version(): packages=find_packages(), url="https://github.com/pytest-dev/pytest-asyncio", license="Apache 2.0", - author="Tin Tvrtković", + author="Tin Tvrtkovic", author_email="tinchester@gmail.com", description="Pytest support for asyncio.", long_description=Path(__file__).parent.joinpath("README.rst").read_text(),