diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..22d0b4e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "scraperwiki" +version = "0.5.1" +description = "Local version of ScraperWiki libraries" +authors = [ + { name = "ScraperWiki Developers", email = "hello@scraperwiki.com" } +] +license = { text = "GPLv3+" } +readme = "README.md" # Assumes you have a README file +urls = { Repository = "https://github.com/cantabular/scraperwiki-python" } +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: SQL", + "Topic :: Database :: Front-Ends", +] +dependencies = [ + "requests", + "six", + "sqlalchemy==1.4.54", + "alembic==1.17.2", +] + +[tool.setuptools.packages.find] +where = ["."] # Or wherever your 'scraperwiki' package folder is located +include = ["scraperwiki*"] diff --git a/setup.py b/setup.py deleted file mode 100755 index fdf03f7..0000000 --- a/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -from __future__ import absolute_import - -# This file is part of Local Scraperlibs. - -import warnings -import os -from distutils.core import setup - - -def has_external_dependency(name): - 'Check that a non-Python dependency is installed.' - for directory in os.environ['PATH'].split(':'): - if os.path.exists(os.path.join(directory, name)): - return True - return False - -if not has_external_dependency('pdftohtml'): - warnings.warn( - 'scraperwiki.pdftoxml requires pdftohtml, but pdftohtml was not found ' - 'in the PATH. If you wish to use this function, you probably need to ' - 'install pdftohtml.' - ) - -config = dict(name='scraperwiki', - author='Francis Irving', - author_email='francis@sensiblecode.io', - description='Local version of ScraperWiki libraries', - url='https://github.com/scraperwiki/scraperwiki-python', - classifiers=[ - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: ' - 'GNU General Public License v3 or later (GPLv3+)', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - 'Programming Language :: SQL', - 'Topic :: Database :: Front-Ends', - ], - packages=['scraperwiki'], - version='0.5.1', - license='GPL', - ) - -try: - from setuptools import setup - config['install_requires'] = ['requests', 'six', - 'sqlalchemy==1.4.54', 'alembic==1.17.2'], -except ImportError: - pass - -setup(**config)