mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/libsass: A straightforward binding of libsass for Python
Dependency of qtsass Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net> Package-Manager: Portage-2.3.84, Repoman-2.3.20 Closes: https://github.com/gentoo/gentoo/pull/14047 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
committed by
Joonas Niilola
parent
18fb920c89
commit
b7eca17fb4
1
dev-python/libsass/Manifest
Normal file
1
dev-python/libsass/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST libsass-0.19.4.tar.gz 315525 BLAKE2B b9a7fe2f42559070a30b2549f74b61fd28a18e842ba25b65c221889d18e319593bd08bfbedf2601cf5510fae33a4e24e96c52117db2290947c979bb1ecd0de53 SHA512 370ac2b4edb0dbf4e5a5b66d7795c6c189894bbe444c25465e922f8a3b435605771f8bb6fc9e25f30e6be889bcf4038d0a05ff2297777c179916de510523e489
|
||||
64
dev-python/libsass/files/libsass-0.19.4_rename_sassc.patch
Normal file
64
dev-python/libsass/files/libsass-0.19.4_rename_sassc.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
diff --git a/sassc.py b/sassc.py
|
||||
deleted file mode 100644
|
||||
index 2415342..0000000
|
||||
--- a/sassc.py
|
||||
+++ /dev/null
|
||||
@@ -1,15 +0,0 @@
|
||||
-import warnings
|
||||
-
|
||||
-import pysassc
|
||||
-
|
||||
-
|
||||
-def main(*args, **kwargs):
|
||||
- warnings.warn(
|
||||
- 'The `sassc` entrypoint is deprecated, please use `pysassc`',
|
||||
- FutureWarning,
|
||||
- ),
|
||||
- return pysassc.main(*args, **kwargs)
|
||||
-
|
||||
-
|
||||
-if __name__ == '__main__':
|
||||
- exit(main())
|
||||
diff --git a/sasstests.py b/sasstests.py
|
||||
index 1f40a97..7547ab3 100644
|
||||
--- a/sasstests.py
|
||||
+++ b/sasstests.py
|
||||
@@ -24,7 +24,6 @@ from werkzeug.wrappers import Response
|
||||
|
||||
import pysassc
|
||||
import sass
|
||||
-import sassc
|
||||
from sassutils._compat import collections_abc
|
||||
from sassutils.builder import Manifest, build_directory
|
||||
from sassutils.wsgi import SassMiddleware
|
||||
@@ -976,7 +975,7 @@ class SasscTestCase(BaseTestCase):
|
||||
|
||||
def test_sassc_stdout(self):
|
||||
with pytest.warns(FutureWarning) as warninfo:
|
||||
- exit_code = sassc.main(
|
||||
+ exit_code = pysassc.main(
|
||||
['sassc', 'test/a.scss'],
|
||||
self.out, self.err,
|
||||
)
|
||||
diff --git a/setup.py b/setup.py
|
||||
index e2a0c85..5905162 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -218,7 +218,7 @@ setup(
|
||||
version=version(),
|
||||
ext_modules=[sass_extension],
|
||||
packages=['sassutils'],
|
||||
- py_modules=['pysassc', 'sass', 'sassc', 'sasstests'],
|
||||
+ py_modules=['pysassc', 'sass', 'sasstests'],
|
||||
package_data={
|
||||
'': [
|
||||
'README.rst',
|
||||
@@ -239,8 +239,6 @@ setup(
|
||||
],
|
||||
'console_scripts': [
|
||||
['pysassc = pysassc:main'],
|
||||
- # TODO: remove `sassc` entry (#134)
|
||||
- ['sassc = sassc:main'],
|
||||
],
|
||||
},
|
||||
install_requires=['six'],
|
||||
31
dev-python/libsass/libsass-0.19.4.ebuild
Normal file
31
dev-python/libsass/libsass-0.19.4.ebuild
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A straightforward binding of libsass for Python"
|
||||
HOMEPAGE="https://github.com/sass/libsass-python"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="dev-libs/libsass
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/PyQt5[testlib,${PYTHON_USEDEP}] )"
|
||||
|
||||
# Remove sassc, in favour of pysassc, see: https://github.com/sass/libsass-python/issues/134
|
||||
# This avoids a file collision with dev-lang/sassc
|
||||
PATCHES=( "${FILESDIR}"/${P}_rename_sassc.patch )
|
||||
|
||||
python_test() {
|
||||
"${EPYTHON}" sasstests.py || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
13
dev-python/libsass/metadata.xml
Normal file
13
dev-python/libsass/metadata.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>andrewammerlaan@riseup.net</email>
|
||||
<name>Andrew Ammerlaan</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user