New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernization: introduce pyproject.toml for setuptools configuration #655
Merged
Merged
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
760f34e
Migrate unit testing and linting to use tox
jayaddison 43c30f2
Remove typing-related modules from library dependencies
jayaddison 612651a
Cleanup: remove empty tox.ini section
jayaddison 1092ee8
Fixup: yaml key name in GitHub Actions workflows (was:name, intended:…
jayaddison fe9bcc6
Relocate platform-specific binary installation of lxml from GitHub Ac…
jayaddison 520b386
Nitpick: disambiguate between platform regex and tox environment name…
jayaddison 5051258
Cleanup: remove package self-installation-dependency from dev-require…
jayaddison fba55ca
Introduce pyproject.toml as packaging configuration for the library
jayaddison be58720
Merge branch 'main' into issue-617/tox-plus-setuptools-pyproject
jayaddison 5d5b44a
Merge branch 'main' into issue-617/tox-plus-setuptools-pyproject
jayaddison 91aaf3a
Add legacy-compatible setup.py (follows guidance at https://setuptool…
jayaddison d25b602
Merge branch 'main' into issue-617/tox-plus-setuptools-pyproject
jayaddison 5900d6e
Fixup: correction for package inclusion/discovery
jayaddison a1e2663
Consistency / compatibility: maintain package name produced by former…
jayaddison 2f86911
Let's keep the scrapers in the package, too
jayaddison 9fe154e
Add an exclude entry for the tests modules, corresponding to the prev…
jayaddison 16a05f2
Add MIT License as text otherwise there's too much gibberish shown in…
hhursev 986c8d8
Remove setup.py file
hhursev ec92eed
Update publish.yaml. Add test_publish too
hhursev 5d9cad4
Bump version to test build
hhursev d4c1f13
Merge branch 'main' into issue-617/tox-plus-setuptools-pyproject
hhursev f00c5fc
Run the test_publish action on push in this branch first. Couldnt fig…
hhursev b6142d1
Misc. remove intervals after/before brackets
hhursev ab117c7
Adjust test_publish. Should be visible in actions section once merged…
hhursev 4adc3cb
Revert "Bump version to test build"
hhursev File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "recipe_scrapers" | ||
description = "Python package, scraping recipes from all over the internet" | ||
authors = [ | ||
{ name = "Hristo Harsev", email = "r+pypi@hharsev.com" }, | ||
] | ||
urls = { Homepage = "https://github.com/hhursev/recipe-scrapers/" } | ||
keywords = ["python", "recipes", "scraper", "harvest", "recipe-scraper", "recipe-scrapers"] | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Topic :: Internet :: WWW/HTTP", | ||
] | ||
dynamic = ["version", "readme"] | ||
requires-python = ">= 3.6" | ||
dependencies = [ | ||
"beautifulsoup4 >= 4.10.0", | ||
"extruct >= 0.8.0", | ||
"isodate >= 0.6.1", | ||
"requests >= 2.19.1", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["recipe_scrapers.*"] | ||
|
||
[tool.setuptools.dynamic] | ||
readme = {file = "README.rst"} | ||
version = {attr = "recipe_scrapers.__version__.__version__"} | ||
|
||
[tool.setuptools.package-data] | ||
recipe_scrapers = ["py.typed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,3 @@ | ||
import os | ||
from typing import Dict | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
|
||
about: Dict[str, str] = {} | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
with open( | ||
os.path.join(here, "recipe_scrapers", "__version__.py"), "r", encoding="utf-8" | ||
) as f: | ||
exec(f.read(), about) | ||
|
||
README = open(os.path.join(os.path.dirname(__file__), "README.rst")).read() | ||
|
||
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) | ||
|
||
setup( | ||
name="recipe_scrapers", | ||
url="https://github.com/hhursev/recipe-scrapers/", | ||
version=about["__version__"], | ||
author="Hristo Harsev", | ||
author_email="r+pypi@hharsev.com", | ||
description="Python package, scraping recipes from all over the internet", | ||
keywords="python recipes scraper harvest recipe-scraper recipe-scrapers", | ||
long_description=README, | ||
long_description_content_type="text/x-rst", | ||
install_requires=[ | ||
"beautifulsoup4>=4.10.0", | ||
"extruct>=0.8.0", | ||
"isodate>=0.6.1", | ||
"requests>=2.19.1", | ||
], | ||
packages=find_packages(), | ||
package_data={"": ["LICENSE", "py.typed"]}, | ||
include_package_data=True, | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Topic :: Internet :: WWW/HTTP", | ||
], | ||
python_requires=">=3.6", | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These four fields have slightly different output in
PKG-INFO
, as produced bysetuptools
v65.5.0, between thesetup.py
approach in themain
branch and thepyproject.toml
approach in this development branch.Author
andAuthor-email
fields are condensed into a singleAuthor-email
line (Firstname Lastname <username@example.org>
format)home-page
URL entry, a list ofProject-URL
entries with associated name, URL pairs is emitted (Homepage, ...
in this case)license-files
entry containing filenames, the license file's content is read and included into thePKG-INFO
fileThose all seem fairly reasonable to me.