From 7398dc74f672086db5e7dcc17809c57bd1dac953 Mon Sep 17 00:00:00 2001 From: "Allen, Timothy" Date: Fri, 17 Feb 2023 14:19:16 -0500 Subject: [PATCH] Complete switch to pyproject.toml and use git tags as versions. --- Makefile | 28 ------------------- pyproject.toml | 74 +++++++++++++++++++++++++------------------------- setup.py | 58 --------------------------------------- 3 files changed, 37 insertions(+), 123 deletions(-) delete mode 100644 Makefile delete mode 100644 setup.py diff --git a/Makefile b/Makefile deleted file mode 100644 index efaea35..0000000 --- a/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -clean-pyc: - find . -name '*.pyc' -exec rm --force {} + - find . -name '*.pyo' -exec rm --force {} + - -test: clean-pyc - python setup.py test - -clean-build: - rm --force --recursive build/ - rm --force --recursive dist/ - rm --force --recursive *.egg-info - -lint: - flake8 wrds - -push: - git push origin master - git push github master - -publish_to_warehouse: - python -m twine upload dist/* - -buld_dist: - python setup.py sdist bdist_wheel - -publish_to_anaconda: - echo "Not implemented" - diff --git a/pyproject.toml b/pyproject.toml index 963c5cf..ed367bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,47 +1,47 @@ +[build-system] +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" + [project] name = "wrds" -version = "3.1.3" -description = "Python access to WRDS Data" +description = "Access WRDS data through PostgreSQL in Python." authors = [ - {name="Eric Stein", email="ericst@wharton.upenn.edu"}, - {name="Alex Malek", email="amalek@wharton.upenn.edu"}, + {name = "Eric Stein", email = "ericst@wharton.upenn.edu"}, + {name = "Alex Malek", email = "amalek@wharton.upenn.edu"}, + {name = "Tim Allen", email = "tallen@wharton.upenn.edu"}, + {name = "Jeff VanSickle", email = "vjef@wharton.upenn.edu"}, ] -license = { file="LICENSE" } +license = {text = "BSD-3-Clause"} readme = "README.rst" -requires-python = ">=3.6" - +requires-python = ">=3.7" keywords = ["wrds", "finance", "research", "crsp", "compustat"] - classifiers = [ - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Financial and Insurance Industry', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'Topic :: Office/Business :: Financial', - 'Topic :: Scientific/Engineering :: Information Analysis', - ] + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: Financial and Insurance Industry", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "Topic :: Office/Business :: Financial", + "Topic :: Scientific/Engineering :: Information Analysis", + "License :: OSI Approved :: BSD License", +] +dependencies = [ + "numpy", + "pandas", + "psycopg2-binary", + "scipy", + "sqlalchemy<2", +] +dynamic = ["version"] [project.urls] -"Homepage" = "http://www.whartonwrds.com" +"Homepage" = "http://wrds-www.wharton.upenn.edu" "Repository" = "https://github.com/wharton/wrds" -"Documentation" = "https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/" - -[dependencies] -mock = "~4.0" -numpy = "~1.20" -pandas= "~1.2" -psycopg2-binary = "~2.8" -scipy = "~1.6" -SQLAlchemy = "~1.4" - -[build-system] -# These are the assumed default build requirements from pip: -# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support -requires = ["setuptools>=40.8.0", "wheel"] -build-backend = "setuptools.build_meta" +"Documentation" = "https://github.com/wharton/wrds/blob/master/README.rst" diff --git a/setup.py b/setup.py deleted file mode 100644 index 917285d..0000000 --- a/setup.py +++ /dev/null @@ -1,58 +0,0 @@ -import os -import sys - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -if sys.argv[-1] == 'publish': - os.system('python setup.py sdist upload') - sys.exit() - -packages = [ - 'wrds' -] - -requires = [ - 'numpy', - 'pandas', - 'sqlalchemy<2.0.0', - 'psycopg2-binary', - # mock may need to be included if folks - # want to run tests w/Py2 - 'mock' -] - -setup( - name='wrds', - version='3.1.3', - description="Python access to WRDS Data", - long_description=open('README.rst').read(), - author='WRDS', - author_email='wrds@wharton.upenn.edu', - url='http://www.whartonwrds.com', - packages=packages, - install_requires=requires, - package_data={ - '': ['LICENSE', 'NOTICE', '*.rst'], - }, - classifiers=( - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Development Status :: 4 - Beta', - 'Environment :: Console', - 'Intended Audience :: End Users/Desktop', - 'Intended Audience :: Financial and Insurance Industry', - 'Intended Audience :: Education', - 'Intended Audience :: Science/Research', - 'Topic :: Office/Business :: Financial', - 'Topic :: Scientific/Engineering :: Information Analysis', - ), -) - -