Comments (7)
Closing this as it seems hatch on py 3.6 is perfectly acceptable.
from soupsieve.
All versions of hatchling require Python >= 3.7. There is no way to install soupsieve 2.3.2 with Python 3.6 without setup.py and setup.cfg.
from soupsieve.
I was able to install it on Python 3.6
from soupsieve.
Yes, installation of hatchling with pip is possible (hatchling-0.21.1-py2.py3-none-any.whl), but trying to install hatchling 0.21.1 from source is not, which is a problem for distro packagers.
PKG-INFO from hatchling 0.21.1 does not include Python 3.6.
Metadata-Version: 2.1
Name: hatchling
Version: 0.21.1
Summary: Modern, extensible Python build backend
Project-URL: Funding, https://github.com/sponsors/ofek
Project-URL: History, https://ofek.dev/hatch/dev/history/
Project-URL: Homepage, https://ofek.dev/hatch/latest/
Project-URL: Source, https://github.com/ofek/hatch/tree/master/backend
Project-URL: Tracker, https://github.com/ofek/hatch/issues
Author-email: Ofek Lev <[email protected]>
Keywords: build,hatch,packaging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: editables>=0.2; python_version > '3'
Requires-Dist: importlib-metadata; python_version < '3.8'
Requires-Dist: packaging>=21.3; python_version > '3'
Requires-Dist: packaging~=20.9; python_version < '3'
Requires-Dist: pathspec>=0.9
Requires-Dist: pluggy>=1.0.0; python_version > '3'
Requires-Dist: pluggy~=0.13; python_version < '3'
Requires-Dist: tomli>=1.2.2; python_version > '3'
Requires-Dist: toml~=0.10.2; python_version < '3'
Description-Content-Type: text/markdown
# Hatchling
from soupsieve.
It doesn't list it in the classifiers, but that doesn't affect building or installing as it is just informational, but it doesn't restrict Python 3.6. There is no `python_requires=">=3.7". I'm not seeing the issue.
from soupsieve.
Had to patch PKG-INFO and src/hatchling/ouroboros.py from hatchling 0.21.1 to make rpmbuild happy.
diff -Naur hatchling-0.21.1.orig/PKG-INFO hatchling-0.21.1/PKG-INFO
--- hatchling-0.21.1.orig/PKG-INFO 2020-02-01 18:00:00.000000000 -0600
+++ hatchling-0.21.1/PKG-INFO 2022-05-02 00:14:37.368183288 -0500
@@ -16,6 +16,7 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
diff -Naur hatchling-0.21.1.orig/src/hatchling/ouroboros.py hatchling-0.21.1/src/hatchling/ouroboros.py
--- hatchling-0.21.1.orig/src/hatchling/ouroboros.py 2020-02-01 18:00:00.000000000 -0600
+++ hatchling-0.21.1/src/hatchling/ouroboros.py 2022-05-02 00:15:17.467223330 -0500
@@ -22,6 +22,7 @@
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Will detail procedure to build hatchling rpm package for rpm based Linux distributions using Python 3.6 (RHEL8, Almalinux8, etc.) and then build soupsieve 2.3.2 rpm package, beause surley somebody else using RHEL8/AlmaLinux8 will have the same issue to install hatchiling:
dnf -y install python3-devel pyproject-rpm-macros python3-editables python3-importlib-metadata python3-pathspec python3-pluggy python3-tomli
pip install hatchling==0.21.1
into build environment (mock) because circle dependency to itself (do not know how to bootstrap this package, yet)- mv /usr/local/lib/python3.6/site-packages/hatchling /usr/lib/python3.6/site-packages/
- Build hatchling 0.21.1 rpm package with the patch to include Python 3.6 with the following lines added to spec file:
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-editables >= 0.2
BuildRequires: python3-importlib-metadata
BuildRequires: python3-pathspec >= 0.9
BuildRequires: python3-pluggy >= 0.13
BuildRequires: python3-tomli >= 1.2.2
Requires: python3-editables >= 0.2
Requires: python3-importlib-metadata
Requires: python3-pathspec >= 0.9
Requires: python3-pluggy >= 0.13
Requires: python3-tomli >= 1.2.2
- Install patched python3-hatchling rpm package into the build environment (mock)
- Build soupsieve 2.3.2 rpm package with BuildRequires for pyproject-rpm-macros and python3-hatchling >= 0.21.1 and using pyproject macros.
Spec file to build rpm package for RHEL8, AlmaLinux 8, etc., based on the spec file used for Fedora:
Name: python-hatchling
Version: 2.3.2
Release: 1%{?dist}
Summary: The build backend used by Hatch
License: MIT
URL: https://pypi.org/project/hatchling
Source0: %{pypi_source hatchling}
# Man page in groff_man(7) format, hand-written for Fedora based on package
# metadata and --help output
Source1: hatchling.1
Patch0: python-hatchling-support-py36.patch
BuildArch: noarch
BuildRequires: python3-devel >= 3.6
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-editables >= 0.2
BuildRequires: python3-importlib-metadata
BuildRequires: python3-pathspec >= 0.9
BuildRequires: python3-pluggy >= 0.13
BuildRequires: python3-tomli >= 1.2.2
# Has circle dependency with itself! Rebuild again with this line un-commented.
# BuildRequires: python3-hatchling >= %{version}
%global common_description %{expand:
This is the extensible, standards compliant build backend used by Hatch.}
%description %{common_description}
%package -n python3-hatchling
Summary: %{summary}
Requires: python3 >= 3.6
Requires: python3-editables >= 0.2
Requires: python3-importlib-metadata
Requires: python3-pathspec >= 0.9
Requires: python3-pluggy >= 0.13
Requires: python3-tomli >= 1.2.2
%description -n python3-hatchling %{common_description}
%prep
%autosetup -p1 -n hatchling-%{version}
# Cannot use -r (the default) with hatchling: “ValueError: build backend cannot
# provide build metadata (incl. runtime requirements) before build”. We work
# around this by writing the dependencies from src/hatchling/ourobororos.py
# into a text file.
PYTHONPATH="${PWD}/src" '%{python3}' <<EOF
from hatchling.ouroboros import CONFIG
deps = CONFIG['project']['dependencies']
with open('requirements.ouroboros.txt', 'w') as reqfile:
reqfile.writelines(f'{dep}\n' for dep in deps)
EOF
%build
%pyproject_wheel
%install
%pyproject_install
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
%check
# It’s not yet clear how, or if, we can run the upstream tests.
# https://github.com/ofek/hatch/issues/120
%files -n python3-hatchling
%dir %{python3_sitelib}/hatchling-%{version}.dist-info/license_files
%license %{python3_sitelib}/hatchling-%{version}.dist-info/license_files/LICENSE.txt
%doc README.md
%{_bindir}/hatchling
%{_mandir}/man1/hatchling.1*
%{python3_sitelib}/hatchling
%{python3_sitelib}/hatchling-%{version}.dist-info
%changelog
So, yes, all these has solved the issue for me.
from soupsieve.
Okay, I didn't know that some packaging maintainers try to use the classifiers as authoritative info to control packaging.
Just as an FYI, soupsieve 2.3.2 will be the last version to be supported on Python 3.6. If I could back in time, I probably would have bumped sousieve to 2.4 and completely dropped Python 3.6 support as well, but I didn't realize the impact on packaging maintainers when I did it as a minor release. I'm sure I'm not the only one who doesn't fully understand how various packaging systems attempt to maintain Python code repos 🙃.
Anyways, I'm glad you were able to solve the issue. I'm sure your provided info is likely to be useful to others who may have to go down a similar path, so thanks for posting your resolution.
from soupsieve.
Related Issues (20)
- CDATA handling in HTML changed in lxml parser with libxml2 2.9.12 HOT 21
- Interesting psuedo class to keep an eye on `:in()` HOT 8
- Rework internal structure of "relations" HOT 1
- circular dependency /bs4 HOT 15
- Attribute selectors vs \n in values HOT 5
- Change in `:has()` CSS Level 4 spec - document our difference or update? HOT 1
- hatch? HOT 5
- setup.py is mentioned in readme but there is no setup.py HOT 2
- Invalid syntax error on python3.4 HOT 5
- Tracking `:scope` issue related to relative selector lists (`:has()`) HOT 1
- pyproject.toml: validation error since setuptools 61.2.0 HOT 8
- PermissionError: [Errno 13] Permission denied HOT 4
- missing dependency on `bs4` HOT 7
- LXML does not currently generate wheels for Python 3.11 on Windows
- `:has()` is no longer forgiving HOT 1
- malformed attribute selector HOT 7
- The new type hints cause pytest to hang after test session HOT 4
- Attribute Selector Case Sensitivity: Whitespace HOT 1
- Potentially rework CSS parsing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soupsieve.