diff --git a/.github/workflows/pcloud-test.yml b/.github/workflows/pcloud-test.yml index cc20c52..0c483d2 100644 --- a/.github/workflows/pcloud-test.yml +++ b/.github/workflows/pcloud-test.yml @@ -29,8 +29,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r test_requirements.txt - pip install -e . + pip install -e ".[test]" playwright install - name: Lint with flake8 run: | diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9563d4e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +package = "pcloud" + +[project] +name = "pcloud" +version = "1.5.dev0" +description = "A client library for pCloud" +authors = [ + { name = "Tom Gross", email = "itconsense@gmail.com" } +] + +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Environment :: Console", + "Environment :: Other Environment", + "Environment :: Web Environment", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Libraries :: Python Modules", +] + +keywords = ["Python", "pCloud", "REST"] + +dependencies = [ + "requests", + "requests-toolbelt", + "setuptools>=75.6.0", + "wheel>=0.45.1", +] + +[project.optional-dependencies] +# development dependency groups +test = [ + "pytest==8.3.4", + "pytest-sugar==1.0.0", + "pytest-timeout==2.3.1", + "pytest-cov==6.0.0", + "pytest-rerunfailures==15.0", + "wheel==0.45.1", + "flake8==7.1.1", + "fs==2.4.16", + "playwright==1.49.1", + "multipart==1.2.1", + "zipp>=3.19.1" +] + +pyfs = ['fs'] + +[project.entry-points."fs.opener"] +pcloud = "pcloud.pcloudfs:PCloudOpener" +"pcloud+eapi" = "pcloud.pcloudfs:PCloudOpener" + diff --git a/setup.py b/setup.py deleted file mode 100644 index 1653e41..0000000 --- a/setup.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -"""Installer for the pcloud package.""" - -from setuptools import find_packages -from setuptools import setup - - -long_description = "\n\n".join( - [ - open("README.rst").read(), - open("CONTRIBUTORS.rst").read(), - open("CHANGES.rst").read(), - ] -) - - -setup( - name="pcloud", - version="1.5.dev0", - description="A client library for pCloud", - long_description=long_description, - # Get more from https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Environment :: Console", - "Environment :: Other Environment", - "Environment :: Web Environment", - "Programming Language :: Python", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Operating System :: OS Independent", - "License :: OSI Approved :: MIT License", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - keywords="Python pCloud REST", - author="Tom Gross", - author_email="itconsense@gmail.com", - url="https://pypi.python.org/pypi/pcloud", - license="MIT", - packages=find_packages("src", exclude=["ez_setup"]), - package_dir={"": "src"}, - include_package_data=True, - zip_safe=False, - install_requires=[ - "requests", - "requests-toolbelt", - "wheel>=0.45.1", - "setuptools>=75.6.0" - ], - extras_require={"pyfs": ["fs"]}, - entry_points={ - "fs.opener": [ - "pcloud = pcloud.pcloudfs:PCloudOpener", - "pcloud+eapi = pcloud.pcloudfs:PCloudOpener", - ], - }, -) diff --git a/test_requirements.txt b/test_requirements.txt deleted file mode 100644 index 73d0d44..0000000 --- a/test_requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -pytest==8.3.4 -pytest-sugar==1.0.0 -pytest-timeout==2.3.1 -pytest-cov==6.0.0 -pytest-rerunfailures==15.0 -wheel==0.45.1 -flake8==7.1.1 -fs==2.4.16 -playwright==1.49.1 -multipart==1.2.1 -setuptools>=75.6.0 # not directly required, pinned by Snyk to avoid a vulnerability -zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file