Skip to content

Commit

Permalink
Migrate to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jan 19, 2024
1 parent 9b9dda6 commit 2c21569
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 117 deletions.
Empty file removed .gitmodules
Empty file.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
all:
@echo '## Make commands ##'
@echo
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs

lint:
mypy --package gdown
ruff format --check
ruff check

format:
ruff format
ruff check --fix

clean:
rm -rf build dist *.egg-info

publish: clean
python -m build --sdist --wheel
python -m twine upload dist/gdown-*

test:
python -m pytest -v tests
30 changes: 0 additions & 30 deletions justfile

This file was deleted.

111 changes: 102 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,102 @@
[tool.black]
line-length = 79
exclude = '''
(
^/\..*
| ^/docs/
| ^/github2pypi/
)
'''
[build-system]
requires = ["hatchling>=1.20.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
name = "gdown"
description = "Google Drive Public File/Folder Downloader"
license = { text = "MIT" }
requires-python = ">=3.8"
authors = [
{ name = "Kentaro Wada", email = "[email protected]" },
]
keywords = [
"google-drive",
"download",
"wget",
"curl",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"filelock",
"requests[socks]",
"six",
"tqdm",
"beautifulsoup4",
]
dynamic = ["readme", "version"]

[project.optional-dependencies]
test = [
"mypy",
"pytest",
"ruff",
"twine",
]

[project.urls]
Homepage = "https://github.com/wkentaro/gdown"

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [
{ path = "README.md" },
]

[tool.hatch.version]
source = "vcs"

[project.scripts]
gdown = "gdown.cli:main"

[tool.mypy]
ignore_missing_imports = true

[tool.ruff]
exclude = [
".conda",
".git",
"src",
]

line-length = 79 # 88
indent-width = 4

[tool.ruff.lint]
# Enable Pyflakes (`F`), pycodestyle (`E`), isort (`I`).
select = ["E", "F", "I"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

[tool.ruff.isort]
force-single-line = true
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

67 changes: 0 additions & 67 deletions setup.py

This file was deleted.

0 comments on commit 2c21569

Please sign in to comment.