diff --git a/Makefile b/Makefile index 86daa6313..be653ed59 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ package: cd $(plugin);\ rm -Rf dist;\ - python setup.py sdist bdist_wheel + python -m build pypi: python -m pip install twine -U diff --git a/kedro-datasets/pyproject.toml b/kedro-datasets/pyproject.toml index 6df7bd372..0f0ad2fc3 100644 --- a/kedro-datasets/pyproject.toml +++ b/kedro-datasets/pyproject.toml @@ -1,3 +1,28 @@ +[project] +name = "kedro-datasets" +authors = [ + {name = "Kedro"} +] +description = "Kedro-Datasets is where you can find all of Kedro's data connectors." +requires-python = ">=3.7, <3.11" +license = {text = "Apache Software License (Apache 2.0)"} +dependencies = [ + "kedro~=0.18.4", +] +dynamic = ["readme", "version", "optional-dependencies"] + +[project.urls] +Source = "https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets" +Documentation = "https://docs.kedro.org" +Tracker = "https://github.com/kedro-org/kedro-plugins/issues" + +[tool.setuptools.packages.find] +include = ["kedro_datasets*"] + +[tool.setuptools.dynamic] +readme = {file = "README.md", content-type = "text/markdown"} +version = {attr = "kedro_datasets.__version__"} + [tool.black] [tool.isort] diff --git a/kedro-datasets/requirements.txt b/kedro-datasets/requirements.txt deleted file mode 100644 index b5edbb617..000000000 --- a/kedro-datasets/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -kedro~=0.18.4 diff --git a/kedro-datasets/setup.py b/kedro-datasets/setup.py index c1bf274ea..ef2fe3fe6 100644 --- a/kedro-datasets/setup.py +++ b/kedro-datasets/setup.py @@ -1,12 +1,6 @@ -import re -from codecs import open from itertools import chain -from os import path -from setuptools import find_packages, setup - -name = "kedro-datasets" -here = path.abspath(path.dirname(__file__)) +from setuptools import setup # at least 1.3 to be able to use XMLDataSet and pandas integration with fsspec PANDAS = "pandas>=1.3, <3.0" @@ -16,21 +10,6 @@ POLARS = "polars~=0.15.16" DELTA = "delta-spark~=1.2.1" -with open("requirements.txt", "r", encoding="utf-8") as f: - install_requires = [x.strip() for x in f if x.strip()] - -with open("test_requirements.txt", "r", encoding="utf-8") as f: - tests_require = [x.strip() for x in f if x.strip() and not x.startswith("-r")] - -# get package version -package_name = name.replace("-", "_") -with open(path.join(here, package_name, "__init__.py"), encoding="utf-8") as f: - version = re.search(r'__version__ = ["\']([^"\']+)', f.read()).group(1) - -# Get the long description from the README file -with open(path.join(here, "README.md"), encoding="utf-8") as f: - readme = f.read() - def _collect_requirements(requires): return sorted(set(chain.from_iterable(requires.values()))) @@ -151,17 +130,5 @@ def _collect_requirements(requires): extras_require["all"] = _collect_requirements(extras_require) setup( - name=name, - version=version, - description="Kedro-Datasets is where you can find all of Kedro's data connectors.", - long_description=readme, - long_description_content_type="text/markdown", - url="https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets", - install_requires=install_requires, - tests_require=tests_require, - author="Kedro", - python_requires=">=3.7, <3.11", - license="Apache Software License (Apache 2.0)", - packages=find_packages(exclude=["tests*"]), extras_require=extras_require, )