Skip to content

Commit

Permalink
make setup declarative
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobatymo committed Aug 8, 2024
1 parent 20d14e6 commit f04a375
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
python-version: 3.8
- name: Build dists
run: |
python -m pip install wheel
python setup.py sdist bdist_wheel
python -m pip install wheel build
python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ repos:
- id: mypy
args: [--install-types, --non-interactive, --show-error-codes]
additional_dependencies:
- bitstruct==8.17.0
- bitstruct==8.19.0
- fastcrc==0.3.0
- genutility[exceptions,file,json]==0.0.105
- genutility[exceptions,file,json]==0.0.106
- importlib-resources==5.12.0
- piexif==1.1.3
- pymediainfo==5.1.0
- requests==2.28.2
- typing-extensions>=4.0.0
- pymediainfo==6.1.0
- requests==2.31.0
- typing-extensions==4.7.1
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
Expand Down
3 changes: 1 addition & 2 deletions filemeta/mp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
import bitstruct
from fastcrc import crc16
from genutility.exceptions import ParseError
from genutility.file import Empty, read_or_raise, PathType, BufferedBinaryIoT
from genutility.file import BufferedBinaryIoT, Empty, PathType, read_or_raise

logger = logging.getLogger(__name__)

PathType = Union[str, os.PathLike]
T_nt = TypeVar("T_nt", bound=NamedTuple)

# general exceptions
Expand Down
52 changes: 50 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,57 @@
[build-system]
build-backend = "setuptools.build_meta"

requires = [
"setuptools",
"wheel",
]

[project]
name = "filemeta"
version = "0.0.3"
description = "functions to read file meta information"
readme = { file = "readme.md", content-type = "text/markdown" }
keywords = [
"mp3",
]
license = { file = "LICENSE" }
authors = [
{ name = "Dobatymo" },
]
requires-python = ">=3.7"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: ISC License (ISCL)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"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",
]
dependencies = [
"bitstruct",
"fastcrc",
"genutility[exceptions,file,json]>=0.0.105",
"importlib-resources",
"piexif",
"pymediainfo",
"requests",
"typing-extensions>=4",
]

urls.Home = "https://github.com/Dobatymo/filemeta"

[tool.setuptools]
packages = [
"filemeta",
"filemeta.data",
]

[tool.setuptools.package-data]
filemeta = [
"py.typed",
"data/*.json",
]

[tool.black]
Expand Down
36 changes: 0 additions & 36 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit f04a375

Please sign in to comment.