diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3da861f..fd64b14e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,23 +8,30 @@ on: jobs: main-windows: - uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0 + uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1 with: - env: '["py38"]' + env: '["py310"]' os: windows-latest arch: '["x64", "x86"]' wheel-tags: true submodules: true main-macos: - uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0 + uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1 with: - env: '["py38"]' + env: '["py310"]' os: macos-latest wheel-tags: true submodules: true + main-macos-intel: + uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1 + with: + env: '["py310"]' + os: macos-15-intel + wheel-tags: true + submodules: true main-linux: - uses: asottile/workflows/.github/workflows/tox.yml@v1.5.0 + uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1 with: - env: '["pypy3", "py38", "py39", "py310", "py311"]' + env: '["py310", "py311", "py312"]' os: ubuntu-latest submodules: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c70a44a..858e5088 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -10,29 +10,29 @@ repos: - id: name-tests-test - id: requirements-txt-fixer - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 + rev: v3.1.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/asottile/reorder-python-imports - rev: v3.12.0 + rev: v3.16.0 hooks: - id: reorder-python-imports - args: [--py38-plus] + args: [--py310-plus] - repo: https://github.com/asottile/add-trailing-comma - rev: v3.1.0 + rev: v4.0.0 hooks: - id: add-trailing-comma - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.21.0 hooks: - id: pyupgrade - args: [--py38-plus] + args: [--py310-plus] - repo: https://github.com/hhatto/autopep8 - rev: v2.1.0 + rev: v2.3.2 hooks: - id: autopep8 - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.3.0 hooks: - id: flake8 exclude: ^docs/conf.py diff --git a/README.rst b/README.rst index 593c78f1..74bd3e5d 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,10 @@ libsass-python: Sass_/SCSS for Python ===================================== +LibSass has reached its end of life. It will no longer receive updates of any kind, +nor will its wrapper libraries. Users should migrate to Dart Sass at their earliest +convenience. See also https://github.com/attakei/sass-embedded-python. + .. image:: https://badge.fury.io/py/libsass.svg :alt: PyPI :target: https://pypi.org/pypi/libsass/ diff --git a/bin/build-manylinux-wheels b/bin/build-manylinux-wheels index 6c091a29..233c5afc 100755 --- a/bin/build-manylinux-wheels +++ b/bin/build-manylinux-wheels @@ -22,7 +22,7 @@ def check_call(*cmd): def main(): os.makedirs('dist', exist_ok=True) with tempfile.TemporaryDirectory() as work: - pip = '/opt/python/cp38-cp38/bin/pip' + pip = '/opt/python/cp39-cp39/bin/pip' check_call( 'docker', 'run', '-ti', # Use this so the files are not owned by root diff --git a/requirements-dev.txt b/requirements-dev.txt index 2ad7467e..eadfb26b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,5 @@ coverage coverage-enable-subprocess pre-commit pytest +setuptools werkzeug>=0.9 diff --git a/sassutils/wsgi.py b/sassutils/wsgi.py index d29fa824..72d3eb13 100644 --- a/sassutils/wsgi.py +++ b/sassutils/wsgi.py @@ -3,11 +3,10 @@ """ import collections.abc +import importlib import logging import os.path -from pkg_resources import resource_filename - from .builder import Manifest from sass import CompileError @@ -107,7 +106,9 @@ def __init__( for package_name in self.manifests: if package_name in self.package_dir: continue - path = resource_filename(package_name, '') + path = os.path.dirname( + importlib.import_module(package_name).__file__, + ) self.package_dir[package_name] = path self.paths = [] for package_name, manifest in self.manifests.items(): diff --git a/setup.cfg b/setup.cfg index 86a67018..22ec98e2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,7 +13,6 @@ classifiers = Development Status :: 5 - Production/Stable Environment :: Web Environment Intended Audience :: Developers - License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: C Programming Language :: C++ @@ -33,7 +32,7 @@ py_modules = pysassc sass sasstests -python_requires = >=3.8 +python_requires = >=3.10 [options.entry_points] console_scripts = diff --git a/setup.py b/setup.py index b78fa05f..d877c2af 100644 --- a/setup.py +++ b/setup.py @@ -96,26 +96,7 @@ def customize_compiler(compiler): elif filename.endswith('.h'): headers.append(filename) - if sys.platform == 'win32': - from distutils.msvc9compiler import get_build_version - vscomntools_env = 'VS{}{}COMNTOOLS'.format( - int(get_build_version()), - int(get_build_version() * 10) % 10, - ) - try: - os.environ[vscomntools_env] = os.environ['VS140COMNTOOLS'] - except KeyError: - distutils.log.warn( - 'You probably need Visual Studio 2015 (14.0) ' - 'or higher', - ) - from distutils import msvccompiler, msvc9compiler - if msvccompiler.get_build_version() < 14.0: - msvccompiler.get_build_version = lambda: 14.0 - if get_build_version() < 14.0: - msvc9compiler.get_build_version = lambda: 14.0 - msvc9compiler.VERSION = 14.0 - elif platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}: + if platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}: # Dirty workaround to avoid link error... # Python distutils doesn't provide any way # to configure different flags for each cc and c++.