Switch from setup.py to pyproject.toml

This commit is contained in:
JustAnotherArchivist
2023-01-13 18:52:03 +00:00
parent 1fb5c39168
commit 8ad26fc7d1
2 changed files with 37 additions and 43 deletions

37
pyproject.toml Normal file
View File

@@ -0,0 +1,37 @@
[build-system]
requires = ['setuptools>=61', 'setuptools_scm>=6.2']
build-backend = 'setuptools.build_meta'
[tool.setuptools]
packages = ['snscrape', 'snscrape.modules']
[tool.setuptools_scm]
[project]
name = 'snscrape'
description = 'A social networking service scraper'
readme = 'README.md'
authors = [{name = 'JustAnotherArchivist'}]
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
]
dependencies = [
'requests[socks]',
'lxml',
'beautifulsoup4',
'pytz; python_version < "3.9.0"',
'filelock',
]
requires-python = '~=3.8'
dynamic = ['version']
[project.urls]
repository = "https://github.com/JustAnotherArchivist/snscrape"
[project.scripts]
snscrape = 'snscrape._cli:main'

View File

@@ -1,43 +0,0 @@
import os.path
import setuptools
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as fp:
readme = fp.read()
setuptools.setup(
name = 'snscrape',
description = 'A social networking service scraper',
long_description = readme,
long_description_content_type = 'text/markdown',
author = 'JustAnotherArchivist',
url = 'https://github.com/JustAnotherArchivist/snscrape',
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
packages = ['snscrape', 'snscrape.modules'],
setup_requires = ['setuptools_scm'],
use_scm_version = True,
install_requires = [
'requests[socks]',
'lxml',
'beautifulsoup4',
'pytz; python_version < "3.9.0"',
'filelock',
],
python_requires = '~=3.8',
extras_require = {
'test': ['coverage'],
},
entry_points = {
'console_scripts': [
'snscrape = snscrape._cli:main',
],
},
)