diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..9946f8da --- /dev/null +++ b/.flake8 @@ -0,0 +1,10 @@ +[flake8] +ignore = + # Whitespace before ':' + E203, + # Too many leading '#' for block comment + E266, + # Line break occurred before a binary operator + W503 +max-line-length = 89 +select = B,C,E,F,W,T4,B9 diff --git a/pyproject.toml b/pyproject.toml index a08101cd..881c8983 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,72 @@ [build-system] requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "PyDrive2" +description = "Google Drive API made easy. Maintained fork of PyDrive." +readme = "README.rst" +authors = [ + {name = "JunYoung Gwak", email = "jgwak@dreamylab.com"}, +] +maintainers = [ + {name = "DVC team", email = "support@dvc.org"}, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +requires-python = ">=3.8" +dependencies = [ + "google-api-python-client>=1.12.5", + "oauth2client>=4.0.0", + "PyYAML>=3.0", + # https://github.com/iterative/PyDrive2/issues/361 + "cryptography<44", + "pyOpenSSL>=19.1.0,<=24.2.1", +] +license = {text = "Apache License 2.0"} +dynamic = ["version"] + +[project.urls] +Documentation = "https://docs.iterative.ai/PyDrive2" +Source = "https://github.com/iterative/PyDrive2" +Changelog = "https://github.com/iterative/PyDrive2/releases" + +[project.optional-dependencies] +fsspec = [ + "fsspec>=2021.07.0", + "tqdm>=4.0.0", + "funcy>=1.14", + "appdirs>=1.4.3", +] +tests = [ + "pytest>=4.6.0", + "timeout-decorator", + "funcy>=1.14", + "flake8", + "flake8-docstrings", + "pytest-mock", + "pyinstaller", + "importlib_resources<6; python_version < '3.10'", + "black==24.10.0", +] + +[project.entry-points.pyinstaller40] +hook-dirs = "pydrive2.__pyinstaller:get_hook_dirs" +tests = "pydrive2.__pyinstaller:get_PyInstaller_tests" + +[tool.setuptools] +packages=[ + "pydrive2", + "pydrive2.test", + "pydrive2.fs", + "pydrive2.__pyinstaller", +] [tool.setuptools_scm] @@ -20,3 +87,8 @@ exclude = ''' | dist )/ ''' + +[tool.pytest.ini_options] +markers = [ + "manual: mark tests to be runnable only in local environment and require user manual actions.", +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 197f7632..00000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -markers = - manual: mark tests to be runnable only in local environment and require user manual actions. diff --git a/setup.py b/setup.py deleted file mode 100644 index 5a152d0c..00000000 --- a/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -from setuptools import setup - -# Extra dependecies to run tests -tests_requirements = [ - "pytest>=4.6.0", - "timeout-decorator", - "funcy>=1.14", - "flake8", - "flake8-docstrings", - "pytest-mock", - "pyinstaller", - "importlib_resources < 6; python_version < '3.10'", -] - -tests_requirements.append("black==24.10.0") - -setup( - name="PyDrive2", - author="JunYoung Gwak", - author_email="jgwak@dreamylab.com", - maintainer="DVC team", - maintainer_email="support@dvc.org", - packages=[ - "pydrive2", - "pydrive2.test", - "pydrive2.fs", - "pydrive2.__pyinstaller", - ], - url="https://github.com/iterative/PyDrive2", - project_urls={ - "Documentation": "https://docs.iterative.ai/PyDrive2", - "Changelog": "https://github.com/iterative/PyDrive2/releases", - }, - license="Apache License 2.0", - description="Google Drive API made easy. Maintained fork of PyDrive.", - long_description=open("README.rst").read(), - long_description_content_type="text/x-rst", - install_requires=[ - "google-api-python-client >= 1.12.5", - "oauth2client >= 4.0.0", - "PyYAML >= 3.0", - # https://github.com/iterative/PyDrive2/issues/361 - "cryptography<44", - "pyOpenSSL >= 19.1.0, <=24.2.1", - ], - extras_require={ - "fsspec": [ - "fsspec >= 2021.07.0", - "tqdm >= 4.0.0", - "funcy >= 1.14", - "appdirs >= 1.4.3", - ], - "tests": tests_requirements, - }, - python_requires=">=3.8", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - entry_points={ - "pyinstaller40": [ - "hook-dirs = pydrive2.__pyinstaller:get_hook_dirs", - "tests = pydrive2.__pyinstaller:get_PyInstaller_tests", - ] - }, -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index c020757c..00000000 --- a/tox.ini +++ /dev/null @@ -1,25 +0,0 @@ -[tox] -envlist = py38, py39, py310, py311 - -[testenv] -changedir = {toxinidir}/pydrive2/test -deps = - pytest - httplib2 - PyYAML - timeout_decorator - futures - git+https://github.com/google/google-api-python-client.git -commands = - py.test -v -s - -[flake8] -ignore = - # Whitespace before ':' - E203, - # Too many leading '#' for block comment - E266, - # Line break occurred before a binary operator - W503 -max-line-length = 89 -select = B,C,E,F,W,T4,B9