commit 5b9f86ebb0f3574243637f33f111586d6f97ae21779b6f46b79e04683e611b19 Author: Matej Cepl Date: Fri Aug 14 16:58:11 2020 +0000 Accepting request 826707 from home:mcepl:work Initial submission of the new package OBS-URL: https://build.opensuse.org/request/show/826707 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..d293dc7 --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + 0.9.0+git + + https://github.com/mcepl/screenplain.git + cleanup-testing + git + .git* + enable + mcepl@cepl.eu + + + *.tar + gz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..cb807a4 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/mcepl/screenplain.git + 0ff963d98eba7faf573ac425d03d8371e88c7e66 \ No newline at end of file diff --git a/py2.patch b/py2.patch new file mode 100644 index 0000000..f1cd7c7 --- /dev/null +++ b/py2.patch @@ -0,0 +1,19 @@ +diff --git a/setup.py b/setup.py +index fdc9b53..5db7014 100755 +--- a/setup.py ++++ b/setup.py +@@ -3,9 +3,11 @@ + from setuptools import setup + + # read the contents of your README file +-from os import path +-this_directory = path.abspath(path.dirname(__file__)) +-with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: ++import os.path ++import io ++ ++this_directory = os.path.abspath(os.path.dirname(__file__)) ++with io.open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + + setup( diff --git a/python-screenplain.changes b/python-screenplain.changes new file mode 100644 index 0000000..2dca72f --- /dev/null +++ b/python-screenplain.changes @@ -0,0 +1,19 @@ +------------------------------------------------------------------- +Fri Aug 14 16:29:32 UTC 2020 - mcepl@cepl.eu + +- Update to version 0.9.0+git.1597420829.0ff963d: + * Replace the deprecated assertEquals with the supported assertEqual. + * Make tests independent on any particular module. + * Use content or README.md as long_description + * Use more common extension .md rather than .markdown + * Python 3 only - not a universal wheel + * Bump version to 0.9.0 - Python 3 only version + * Remove Python 2 from classifiers #54 + * Update readme for Python 3 #54 + * Remove Python 2.7 from CI #54 + * Removing Python 2 support - no need for six #54 + +------------------------------------------------------------------- +Fri Aug 14 13:16:52 UTC 2020 - Matej Cepl + +- Initial packaging effort for 0.9.0. diff --git a/python-screenplain.spec b/python-screenplain.spec new file mode 100644 index 0000000..3fff0c4 --- /dev/null +++ b/python-screenplain.spec @@ -0,0 +1,94 @@ +# +# spec file for package python-screenplain +# +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + +%if 0%{?suse_version} > 1500 +%bcond_with python2 +%else +%bcond_without python2 +%endif +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-screenplain +Version: 0.9.0+git.1597420829.0ff963d +Release: 0 +License: MIT +Summary: Convert text file to viewable screenplay +Url: http://www.screenplain.com/ +Group: Development/Languages/Python +# Source: https://files.pythonhosted.org/packages/source/s/screenplain/screenplain-%%{version}.tar.gz +# Tarball generated from gh#vilcans/screenplain#62 +Source: screenplain-%{version}.tar.gz +# PATCH-FIX-UPSTREAM py2.patch mcepl@suse.com +# Don't use open(), but more compatible io.open() +Patch0: py2.patch +BuildRequires: python-rpm-macros +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module reportlab} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pycodestyle} +BuildRequires: fdupes +BuildArch: noarch +Requires: python-reportlab +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%python_subpackages + +%description +Screenplain allows you to write a screenplay as a plain text +file using a format called Fountain. Text files are simple +and supported by all text manipulation software. It's not +just for hackers, too. The simplicity of plain text allows +you to easily view and edit them on devices such as tablets +and phones. No need for specific screenwriting software. + +The magic that Screenplain performs is to take your plain +text file and convert it to a good looking screenplay in an +industry standard format. Send that file off to your producer, +agent, director or screenwriting competition. Currently, the +supported output formats are FDX and HTML. PDF will hopefully +be supported in a not too distant future. + + +%prep +%setup -q -n screenplain-%{version} +%autopatch -p1 + +sed -i '1{/^#!.*env python/d}' screenplain/main.py + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/screenplain +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export PYTEST_ADDOPTS="--doctest-modules" +%pytest +python3 -mpycodestyle -v --ignore=E402,W504 screenplain tests + +%post +%python_install_alternative screenplain + +%postun +%python_uninstall_alternative screenplain + +%files %{python_files} +%python_alternative %{_bindir}/screenplain +%{python_sitelib}/* + +%changelog diff --git a/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz b/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz new file mode 100644 index 0000000..c4fbe1e --- /dev/null +++ b/screenplain-0.9.0+git.1597420829.0ff963d.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b02872b346f4730d7539e056b3a44ecfc2f556081914c032214ce6d3cdbc4fa5 +size 24496