diff --git a/mtg-1.6.1.tar.gz b/mtg-1.6.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..efd748e9abedccfc2c5d8cb6600b24ef302dcb22 Binary files /dev/null and b/mtg-1.6.1.tar.gz differ diff --git a/python-mtg.spec b/python-mtg.spec new file mode 100644 index 0000000000000000000000000000000000000000..d2d5a6d4cdda8e0e08fd1320da1626c9294e7f13 --- /dev/null +++ b/python-mtg.spec @@ -0,0 +1,71 @@ +%global pypi_name mtg + +Name: python-%{pypi_name} +Version: 1.6.1 +Release: 1 +Summary: Console-based access to the Gatherer Magic Card Database + +License: MIT +URL: https://github.com/chigby/mtg + +# Documentation, license, and unit tests aren't available from PyPI, so pull from github. +# Unfortunately, we have to modify the github tarball to remove Gatherer data. (tests/_data). +# https://github.com/chigby/mtg/archive/%{version}/mtg-%{version}.tar.gz +Source0: %{pypi_name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-lxml, python3-cssselect, python3-nose + +%description +Search for Magic cards from the command line. Limit your results by card name, +color, type, rules text, converted mana cost, power, toughness, or expansion +set. Rulings and flavor text also available. Clean interface and output. + +%package -n python3-%{pypi_name} +Summary: Console-based access to the Gatherer Magic Card Database +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3-lxml +Requires: python3-cssselect + +# This is (primarily) a CLI application; provide "mtg". +Provides: mtg + +%description -n python3-%{pypi_name} +Search for Magic cards from the command line. Limit your results by card name, +color, type, rules text, converted mana cost, power, toughness, or expansion +set. Rulings and flavor text also available. Clean interface and output. + + +%prep +%autosetup -n %{pypi_name}-%{version} + +# Remove unit tests that depend on _data (which is copyright WoTC and probably not shippable). +rm -f tests/card_extractor_test.py + +%build +%py3_build + +%install +%py3_install + +# Since there's no potential collision, we don't need to version the mtg binary. +# cp %{buildroot}/%{_bindir}/mtg %{buildroot}/%{_bindir}/mtg-3 +# ln -sf %{_bindir}/mtg-3 %{buildroot}/%{_bindir}/mtg-%{python3_version} + +%check +nosetests-3 -v + +%files -n python3-%{pypi_name} +%doc README.md +%license LICENSE +%{_bindir}/mtg +%{python3_sitelib}/mtglib +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Web Jul 07 2021 Python Mtg - 1.6.1-17 +- Init package