14
0
Files
python-screenplain/python-screenplain.spec
Matej Cepl 69480c4b7f - Update to version 0.9.0+git.1679174041.302bfdd:
* Don't use open, but more compatible io.open
  * Make tests independent on any particular module.
  * Add Python 3.11 to testing matrix
  * Add test for forcing action with "!"
  * Fix runtime error in pdf output of dual dialog
  * Possible to force action by starting line with !
  * pdf Settings object for styles and layout
  * Replace nose with pytest
  * assertEquals is deprecated - use assertEqual
  * Remove unittest2 (Python 2 compatibility)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screenplain?expand=0&rev=10
2023-03-20 13:35:26 +00:00

95 lines
3.0 KiB
RPMSpec

#
# spec file for package python-screenplain
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://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.1679174041.302bfdd
Release: 0
Summary: Convert text file to viewable screenplay
License: MIT
Group: Development/Languages/Python
URL: http://www.screenplain.com/
# 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 fix_entry_point.patch mcepl@suse.com
# entry point lead to incorrect function.
Patch0: fix_entry_point.patch
BuildRequires: %{python_module pycodestyle}
BuildRequires: %{python_module reportlab}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
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
%pyunittest discover -v -p '*test*.py'
%python_exec -mdoctest -v screenplain/*.py
%python_exec -mpycodestyle -v screenplain tests
%post
%python_install_alternative screenplain
%postun
%python_uninstall_alternative screenplain
%files %{python_files}
%python_alternative %{_bindir}/screenplain
%{python_sitelib}/*
%changelog