summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2020-11-19 16:13:25 -0800
committerMichel Alexandre Salim <salimma@fedoraproject.org>2020-11-19 16:13:25 -0800
commit96ab700a27b1f7e1eaec8121751f6ee6f49872ff (patch)
tree7bdbcdd02f625f8f5de541e79182d02ae9273bca /python
parentb4f26c9e68b3e396e9bb87626968d1db65f7dd9e (diff)
downloadspecs-96ab700a27b1f7e1eaec8121751f6ee6f49872ff.tar.gz
specs-96ab700a27b1f7e1eaec8121751f6ee6f49872ff.tar.xz
specs-96ab700a27b1f7e1eaec8121751f6ee6f49872ff.zip
+ python-bowler and dependencies
Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
Diffstat (limited to 'python')
-rw-r--r--python/python-bowler.spec88
-rw-r--r--python/python-fissix.spec68
-rw-r--r--python/python-moreorless.spec67
-rw-r--r--python/python-volatile.spec63
4 files changed, 286 insertions, 0 deletions
diff --git a/python/python-bowler.spec b/python/python-bowler.spec
new file mode 100644
index 0000000..6a5adb8
--- /dev/null
+++ b/python/python-bowler.spec
@@ -0,0 +1,88 @@
+%global srcname bowler
+
+%bcond_without tests
+
+Name: python-%{srcname}
+Version: 0.9.0
+Release: 1%{?dist}
+Summary: Safe code refactoring for modern Python projects
+License: MIT
+URL: https://pybowler.io
+Source0: %{pypi_source}
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: %{py3_dist appdirs}
+BuildRequires: %{py3_dist attrs}
+BuildRequires: %{py3_dist click}
+BuildRequires: %{py3_dist coverage}
+BuildRequires: %{py3_dist fissix}
+BuildRequires: %{py3_dist moreorless} >= 0.2.0
+BuildRequires: %{py3_dist volatile}
+%endif
+
+
+%global _description %{expand:
+Bowler is a refactoring tool for manipulating Python at the syntax tree level.
+It enables safe, large scale code modifications while guaranteeing that the
+resulting code compiles and runs. It provides both a simple command line
+interface and a fluent API in Python for generating complex code modifications
+in code.}
+
+%description %_description
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+
+%description -n python3-%{srcname} %_description
+
+
+%package -n python3-%{srcname}-docs
+Summary: Documentation for python3-%{srcname}
+Requires: python3-%{srcname} = %{version}-%{release}
+
+%description -n python3-%{srcname}-docs %_description
+
+The python3-%{srcname}-docs package contains documentation for python3-%{srcname}.
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+sed -i '1d' $(grep -l '#!/usr/bin/env' bowler/*.py)
+# this is only needed for testing
+sed -i '/volatile/d' requirements.txt
+
+
+%build
+%py3_build
+
+
+%install
+%py3_install
+
+
+%if %{with tests}
+%check
+%{python3} -m coverage run -m bowler.tests
+%endif
+
+
+%files -n python3-%{srcname}
+%license LICENSE
+%doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
+%{_bindir}/%{srcname}
+%{python3_sitelib}/%{srcname}/
+%exclude %{python3_sitelib}/%{srcname}/tests
+%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
+
+%files -n python3-%{srcname}-docs
+%doc docs/*.md
+
+
+%changelog
+* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
+- Initial package
diff --git a/python/python-fissix.spec b/python/python-fissix.spec
new file mode 100644
index 0000000..d2fe5f4
--- /dev/null
+++ b/python/python-fissix.spec
@@ -0,0 +1,68 @@
+%global srcname fissix
+
+%bcond_without tests
+
+Name: python-%{srcname}
+Version: 20.8.0
+Release: 1%{?dist}
+Summary: Monkeypatches to override default behavior of lib2to3
+License: Python
+URL: https://github.com/jreese/fissix
+Source0: %{pypi_source}
+Patch0: %{srcname}-dont_ship_tests.patch
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-test
+BuildRequires: %{py3_dist appdirs}
+BuildRequires: %{py3_dist pytest}
+%endif
+
+
+%global _description %{expand:
+Backport of latest lib2to3, with enhancements.}
+
+
+%description %_description
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+# not sure why but automatic requires don't work
+Requires: %{py3_dist appdirs}
+
+%description -n python3-%{srcname} %_description
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+sed -i '1d' fissix/pgen2/token.py
+
+
+%build
+%py3_build
+
+
+%install
+%py3_install
+cp -p fissix/*.txt %{buildroot}%{python3_sitelib}/%{srcname}/
+
+
+%check
+# mv fissix-tests fissix/tests
+%{python3} -m pytest --verbose fissix/tests
+
+
+%files -n python3-%{srcname}
+%license LICENSE
+%doc README.md
+%{python3_sitelib}/%{srcname}/
+%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
+
+
+%changelog
+* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
+- Initial package
diff --git a/python/python-moreorless.spec b/python/python-moreorless.spec
new file mode 100644
index 0000000..a6bc84a
--- /dev/null
+++ b/python/python-moreorless.spec
@@ -0,0 +1,67 @@
+%global srcname moreorless
+
+%bcond_without tests
+
+Name: python-%{srcname}
+Version: 0.3.0
+Release: 1%{?dist}
+Summary: Python diff wrapper
+License: MIT
+URL: https://github.com/thatch/moreorless/
+Source0: %{pypi_source}
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: %{py3_dist setuptools_scm}
+%if %{with tests}
+BuildRequires: %{py3_dist click}
+BuildRequires: %{py3_dist coverage}
+BuildRequires: %{py3_dist parameterized}
+BuildRequires: %{py3_dist volatile}
+%endif
+
+
+%global _description %{expand:
+This is a thin wrapper around difflib.unified_diff that Does The Right Thing for
+"No newline at eof". The args are also simplified compared to difflib.}
+
+%description %_description
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+
+%description -n python3-%{srcname} %_description
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+
+
+%build
+%py3_build
+
+
+%install
+%py3_install
+
+
+%if %{with tests}
+%check
+%{python3} -m coverage run -m moreorless.tests
+%endif
+
+
+%files -n python3-%{srcname}
+%license LICENSE
+%doc README.md
+%{python3_sitelib}/%{srcname}/
+%exclude %{python3_sitelib}/%{srcname}/py.typed
+%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
+
+
+%changelog
+* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.3.0-1
+- Initial package
diff --git a/python/python-volatile.spec b/python/python-volatile.spec
new file mode 100644
index 0000000..78c0db8
--- /dev/null
+++ b/python/python-volatile.spec
@@ -0,0 +1,63 @@
+%global srcname volatile
+
+Name: python-%{srcname}
+Version: 2.1.0
+Release: 1%{?dist}
+Summary: A small extension for the tempfile module
+License: MIT
+URL: https://github.com/mbr/volatile
+Source0: %{pypi_source}
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+
+
+%global _description %{expand:
+Temporary files and directories.
+
+Contains replacement for tempfile.NamedTemporaryFile that does not delete the
+file on close(), but still unlinks it after the context manager ends, as well as
+a mkdtemp-based temporary directory implementation.
+
+- Mostly reuses the stdlib implementations, supporting the same signatures.
+- Due to that, uses the OS’s built-in temporary file facilities, no custom
+ schemes.
+- Tested on Python 2.6+ and 3.3+}
+
+%description %_description
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+
+%description -n python3-%{srcname} %_description
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+
+
+%build
+%py3_build
+
+
+%install
+%py3_install
+
+
+%check
+%{python3} setup.py test
+
+
+%files -n python3-%{srcname}
+# TODO ask upstream to include license
+%doc README.rst
+%{python3_sitelib}/%{srcname}/
+%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
+
+
+%changelog
+* Thu Nov 19 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.9.0-1
+- Initial package