forked from pool/python-runthis-sphinxext
Accepting request 801358 from home:sebix
required for xonsh switched to github tarball OBS-URL: https://build.opensuse.org/request/show/801358 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-runthis-sphinxext?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
7
download_client.sh
Normal file
7
download_client.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
CLIENT_VERSION=$(tar -xzOf runthis-sphinxext-0.0.3.tar.gz runthis-sphinxext-0.0.3/setup.py | awk '/^CLIENT_VERSION/ {print gensub("\"", "", "G", $3)}')
|
||||
|
||||
wget https://github.com/regro/runthis-client/releases/download/${CLIENT_VERSION}/runthis-client-${CLIENT_VERSION}.min.js
|
||||
wget -O sha256-${CLIENT_VERSION}.txt https://github.com/regro/runthis-client/releases/download/${CLIENT_VERSION}/sha256.txt
|
23
no_download_setup.patch
Normal file
23
no_download_setup.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff -Naur orig/setup.py runthis-sphinxext-0.0.3/setup.py
|
||||
--- orig/setup.py 2020-04-12 09:49:35.913262980 +0200
|
||||
+++ runthis-sphinxext-0.0.3/setup.py 2020-04-12 09:50:19.297293997 +0200
|
||||
@@ -24,11 +24,6 @@
|
||||
client_fname = os.path.join("runthis", f"runthis-client-{CLIENT_VERSION}.min.js")
|
||||
url = f"https://github.com/regro/runthis-client/releases/download/{CLIENT_VERSION}/sha256.txt"
|
||||
sha256_fname = f"sha256-{CLIENT_VERSION}.txt"
|
||||
- if not os.path.isfile(sha256_fname):
|
||||
- with urllib.request.urlopen(url) as f:
|
||||
- b = f.read()
|
||||
- with open(sha256_fname, "wb") as f:
|
||||
- f.write(b)
|
||||
# make checksum mapping
|
||||
with open(sha256_fname) as f:
|
||||
data = f.read()
|
||||
@@ -57,7 +52,6 @@
|
||||
with open(os.path.join(os.path.dirname(__file__), "README.md"), "r") as f:
|
||||
readme = f.read()
|
||||
# make sure we have the client with the correct version avialable
|
||||
- download_client()
|
||||
checksum_client()
|
||||
copy_client()
|
||||
# actually install
|
3
python-runthis-sphinxext-0.0.3.tar.gz
Normal file
3
python-runthis-sphinxext-0.0.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f4f9c00057e378efbf9825984e8cafaa0932ca773813b57f53a75d4c0ca0180
|
||||
size 12337
|
10
python-runthis-sphinxext.changes
Normal file
10
python-runthis-sphinxext.changes
Normal file
@@ -0,0 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 12 08:05:44 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||
|
||||
- add no_download_setup.patch for skipping the files download during build.
|
||||
- add download_client.sh as helper to download files for build.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 11 20:22:12 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||
|
||||
- initial package for version 0.0.3.
|
66
python-runthis-sphinxext.spec
Normal file
66
python-runthis-sphinxext.spec
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# spec file for package python-runthis-sphinxext
|
||||
#
|
||||
# Copyright (c) 2020 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/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-runthis-sphinxext
|
||||
Version: 0.0.3
|
||||
Release: 0
|
||||
Summary: Provides a sphinx code-block for rendering RunThis blocks
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/regro/runthis-sphinxext
|
||||
# pypi tarball does not contain docs and license
|
||||
#Source: https://files.pythonhosted.org/packages/source/r/runthis-sphinxext/runthis-sphinxext-%%{version}.tar.gz
|
||||
Source: https://github.com/regro/runthis-sphinxext/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source1: runthis-client-0.0.3.min.js
|
||||
Source2: sha256-0.0.3.txt
|
||||
# PATCH-FIX-OPENSUSE no_download_setup.patch -- do not download files during setup
|
||||
Patch0: no_download_setup.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This provides a sphinx extension that adds RunThis code blocks,
|
||||
which display a highligthed code-block statically, but with a
|
||||
"RunThis" button above them. When the button is clicked, the code
|
||||
block is replaced by a terminal session that has executed that
|
||||
code.
|
||||
|
||||
%prep
|
||||
%setup -q -n runthis-sphinxext-%{version}
|
||||
cp %{SOURCE1} runthis/
|
||||
cp %{SOURCE2} .
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%files %{python_files}
|
||||
%{python_sitelib}/*
|
||||
%doc README.md AUTHORS.md
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
1
runthis-client-0.0.3.min.js
vendored
Normal file
1
runthis-client-0.0.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
sha256-0.0.3.txt
Normal file
2
sha256-0.0.3.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
8ee8281b49f43d5f33c4e9eeeae499cb453e67869bbd700ac4c4447f941e7d1d runthis-client-0.0.3.js
|
||||
be08a56df313e91f48d150e308f6770a922486445793ca717086228fb188f45c runthis-client-0.0.3.min.js
|
Reference in New Issue
Block a user