diff --git a/pyproject.toml b/pyproject.toml index 7971446d5f..ba356a7e7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,50 @@ # Minimum requirements for the build system to execute. requires = ["setuptools>=65.5.1", "wheel"] # PEP 518 specifications. +[project] +name = "kedro" +authors = [ + {name = "Kedro"} +] +description = "Kedro helps you build production-ready data and analytics pipelines" +requires-python = ">=3.7, <3.11" +keywords = [ + "pipelines", + "machine learning", + "data pipelines", + "data science", + "data engineering", +] +license = {text = "Apache Software License (Apache 2.0)"} +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] +dynamic = ["readme", "version", "dependencies", "optional-dependencies"] + +[project.urls] +Homepage = "https://kedro.org" +Source = "https://github.com/kedro-org/kedro" +Documentation = "https://docs.kedro.org" +Tracker = "https://github.com/kedro-org/kedro/issues" + +[project.scripts] +kedro = "kedro.framework.cli:main" + +[tool.setuptools] +zip-safe = false + +[tool.setuptools.packages.find] +include = ["kedro*"] + +[tool.setuptools.dynamic] +readme = {file = "README.md", content-type = "text/markdown"} +version = {attr = "kedro.__version__"} +dependencies = {file = "dependency/requirements.txt"} + [tool.black] exclude = "/templates/|^features/steps/test_starter" diff --git a/setup.py b/setup.py index 88ad5ca6bc..274ffa2a3a 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,9 @@ -import re from codecs import open from glob import glob from itertools import chain from os import path -from setuptools import find_packages, setup +from setuptools import setup name = "kedro" here = path.abspath(path.dirname(__file__)) @@ -15,23 +14,10 @@ HDFS = "hdfs>=2.5.8, <3.0" S3FS = "s3fs>=0.3.0, <0.5" -# get package version -with open(path.join(here, name, "__init__.py"), encoding="utf-8") as f: - result = re.search(r'__version__ = ["\']([^"\']+)', f.read()) - - if not result: - raise ValueError("Can't find the version in kedro/__init__.py") - - version = result.group(1) - # get the dependencies and installs with open("dependency/requirements.txt", encoding="utf-8") as f: requires = [x.strip() for x in f if x.strip()] -# Get the long description from the README file -with open(path.join(here, "README.md"), encoding="utf-8") as f: - readme = f.read() - template_files = [] for pattern in ["**/*", "**/.*", "**/.*/**", "**/.*/.**"]: template_files.extend( @@ -159,30 +145,8 @@ def _collect_requirements(requires): extras_require["all"] = _collect_requirements(extras_require) setup( - name=name, - version=version, - description="Kedro helps you build production-ready data and analytics pipelines", - license="Apache Software License (Apache 2.0)", - long_description=readme, - long_description_content_type="text/markdown", - url="https://github.com/kedro-org/kedro", - python_requires=">=3.7, <3.11", - packages=find_packages(exclude=["docs*", "tests*", "tools*", "features*"]), - include_package_data=True, - install_requires=requires, - author="Kedro", - entry_points={"console_scripts": ["kedro = kedro.framework.cli:main"]}, package_data={ name: ["py.typed", "test_requirements.txt"] + template_files }, - zip_safe=False, - keywords="pipelines, machine learning, data pipelines, data science, data engineering", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], extras_require=extras_require, )