From 8ad26fc7d1349fabf79ab22c7d3db3f05c67f5c6 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Fri, 13 Jan 2023 18:52:03 +0000 Subject: [PATCH] Switch from setup.py to pyproject.toml --- pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ setup.py | 43 ------------------------------------------- 2 files changed, 37 insertions(+), 43 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0ccf5bd --- /dev/null +++ b/pyproject.toml @@ -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' diff --git a/setup.py b/setup.py deleted file mode 100644 index b4e484e..0000000 --- a/setup.py +++ /dev/null @@ -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', - ], - }, -)