14
0

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
This commit is contained in:
2020-08-14 16:58:11 +00:00
committed by Git OBS Bridge
commit 5b9f86ebb0
8 changed files with 180 additions and 0 deletions

94
python-screenplain.spec Normal file
View File

@@ -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