Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37520749
en ru br
Репозитории ALT

Группа :: Разработка/Python
Пакет: python3-module-pyScss

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

%define oname pyScss

%def_with check

Name: python3-module-%oname
Version: 1.4.0
Release: alt1
Summary: pyScss is a compiler for the Sass language
License: MIT
Group: Development/Python
Url: https://pypi.org/project/pyScss

# https://github.com/Kronuz/pyScss

Source: %name-%version.tar
Patch1: %name-%version-alt.patch

BuildRequires: libpcre-devel
BuildRequires(pre): rpm-build-python3

%if_with check
BuildRequires: python3(PIL)
BuildRequires: python3(pytest)
BuildRequires: python3(tox)
%endif

%py3_provides %oname
%py3_requires PIL

%description
pyScss is a compiler for the Sass language, a superset of CSS3 that adds
programming capabilities and some other syntactic sugar.

%prep
%setup
%patch1 -p1

# fix shebangs

grep -sm1 -rl \
   -e '^#!/usr/bin/env python.*$' | \
xargs sed -s -e '1 s/^#!\/usr\/bin\/env python.*$/#!\/usr\/bin\/python3/'

%build
%add_optflags -I%_includedir/pcre -fno-strict-aliasing
%python3_build

%install
%python3_install
install -p -m644 scss/grammar/*.g \
%buildroot%python3_sitelibdir/scss/grammar/

pushd %buildroot%_bindir
for i in $(ls); do
mv $i $i.py3
done
popd

%check
sed -i '/^\[testenv\]$/a whitelist_externals =\
   \/bin\/cp\
   \/bin\/sed\
setenv =\
   py3: _PYTEST_BIN=%_bindir\/py.test3\
commands_pre =\
   \/bin\/cp {env:_PYTEST_BIN:} \{envbindir\}\/py.test\
   \/bin\/sed -i \x271c #!\{envpython\}\x27 \{envbindir\}\/py.test' tox.ini
export PIP_NO_BUILD_ISOLATION=no
export PIP_NO_INDEX=YES
export TOXENV=py3
tox.py3 --sitepackages -vv -r

%files
%doc DESCRIPTION *.rst
%_bindir/less2scss.py3
%_bindir/pyscss.py3
%python3_sitelibdir/%oname-%version-py%_python3_version.egg-info/
%dir %python3_sitelibdir/scss
%python3_sitelibdir/scss/*.py
%python3_sitelibdir/scss/__pycache__/
%dir %python3_sitelibdir/scss/grammar
%python3_sitelibdir/scss/grammar/*.py
%python3_sitelibdir/scss/grammar/*.g
%python3_sitelibdir/scss/grammar/_scanner.*.so
%python3_sitelibdir/scss/grammar/__pycache__/
%python3_sitelibdir/scss/extension/

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin