summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-03-31 14:13:06 +0200
committerMichał Górny <mgorny@gentoo.org>2023-03-31 14:19:13 +0200
commit425fdd5d1abd5904782a4bc1abb296c9a79ef9e7 (patch)
tree74f4f37321452a4fa78a7e09f56a4847a321f0ab /dev-python/libsass
parentdev-python/libsass-python: Add MY_P prior to rename (diff)
downloadgentoo-425fdd5d1abd5904782a4bc1abb296c9a79ef9e7.tar.gz
gentoo-425fdd5d1abd5904782a4bc1abb296c9a79ef9e7.tar.bz2
gentoo-425fdd5d1abd5904782a4bc1abb296c9a79ef9e7.zip
Rename dev-python/{libsass-python → libsass}
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/libsass')
-rw-r--r--dev-python/libsass/Manifest1
-rw-r--r--dev-python/libsass/libsass-0.22.0-r1.ebuild62
-rw-r--r--dev-python/libsass/metadata.xml16
3 files changed, 79 insertions, 0 deletions
diff --git a/dev-python/libsass/Manifest b/dev-python/libsass/Manifest
new file mode 100644
index 000000000000..1e50ee28909d
--- /dev/null
+++ b/dev-python/libsass/Manifest
@@ -0,0 +1 @@
+DIST libsass-python-0.22.0.gh.tar.gz 55135 BLAKE2B 8495462fa8e6a68bf73ecdf68771c577bad1affa1121c1781dac41c912aae731df88c2b1d1a4ef363e50a98ff1b471e7c45562faa6f2425e8ec5f47f9cf76c6c SHA512 13914b60fe19fc70d197a948a2bc83f7646e4acaa45caed6df68bf2eb10e0a7ef811cdbbcc7a4338f9c1433cba8e316146c20072dc4ff34f51e094ead1bfdcd7
diff --git a/dev-python/libsass/libsass-0.22.0-r1.ebuild b/dev-python/libsass/libsass-0.22.0-r1.ebuild
new file mode 100644
index 000000000000..9983462bd91a
--- /dev/null
+++ b/dev-python/libsass/libsass-0.22.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+MY_P=libsass-python-${PV}
+DESCRIPTION="A straightforward binding of libsass for Python"
+HOMEPAGE="
+ https://github.com/sass/libsass-python/
+ https://pypi.org/project/libsass/
+"
+SRC_URI="
+ https://github.com/sass/libsass-python/archive/${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="
+ >=dev-libs/libsass-3.6.5
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ test? (
+ dev-python/PyQt5[testlib,${PYTHON_USEDEP}]
+ dev-python/werkzeug[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ echo "${PV}" > .libsass-upstream-version || die
+ distutils-r1_src_prepare
+ export SYSTEM_SASS=1
+ # https://bugs.gentoo.org/881339
+ # the package is applying C++ flags to C sources
+ sed -i -e "s:'-std=gnu++0x',::" -e "s:'-lstdc++'::" setup.py || die
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # probably broken by removal of sassc
+ sasstests.py::SasscTestCase::test_sassc_stdout
+ # skip the pip tests because they need an internet connection
+ # not relevant for gentoo anyway
+ sasstests.py::DistutilsTestCase::test_build_sass
+ sasstests.py::DistutilsTestCase::test_output_style
+ )
+
+ epytest sasstests.py
+}
diff --git a/dev-python/libsass/metadata.xml b/dev-python/libsass/metadata.xml
new file mode 100644
index 000000000000..4e80ccda26d2
--- /dev/null
+++ b/dev-python/libsass/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrewammerlaan@gentoo.org</email>
+ <name>Andrew Ammerlaan</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">sass/libsass-python</remote-id>
+ <remote-id type="pypi">libsass</remote-id>
+ </upstream>
+</pkgmetadata>