diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23375a1..87d82da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: Lestdo CI/CD on: push: branches: + - release - main - tags pull_request: @@ -50,10 +51,11 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install 'build[virtualenv]' - name: Build package run: | - python setup.py sdist bdist_wheel + python -m build - name: Publish package to PyPI env: @@ -61,5 +63,5 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python -m pip install --upgrade twine - twine upload dist/* + python -m twine upload dist/* diff --git a/setup.cfg b/setup.cfg index 5aef279..30cb125 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,52 @@ [metadata] -description-file = README.rst +name = letsdo +description = Time tracker for Command Line +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/clobrano/letsdo +author = Carlo Lobrano +author_email = c.lobrano@gmail.com +license = GPL3 +classifiers = + Development Status :: 5 - Production/Stable + Topic :: Utilities +keywords = productivity, GTD, time tracker + +[options] +package_dir = + = src +packages = find: +install_requires = + docopt + PyYaml + terminaltables + parsedatetime + raffaello +include_package_data = True +py_modules = + app + cli + configuration + handlers + log + tasks + timetoolkit + +[options.extras_require] +dev = + pytest>=7.0 + twine>=4.0.2 + +[options.packages.find] +where = src + +[options.entry_points] +console_scripts = + lets=cli:main + +[tool:pytest] +addopts = -v + +[tool.setuptools_scm] +write_to = src/letsdo/_version.py + diff --git a/setup.py b/setup.py index 568a59d..3e3deb0 100644 --- a/setup.py +++ b/setup.py @@ -1,51 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -""" -Setuptool configuration for letsdo -""" -from setuptools import setup, find_packages -__version__ = "0.7.3" +from setuptools import setup -with open("README.md", "r", encoding="UTF-8") as f: - long_description = f.read() +setup() -setup( - name="letsdo", - version=__version__, - description="Time tracker for Command Line", - package_dir={"": "src"}, - packages=find_packages("src"), - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/clobrano/letsdo", - author="Carlo Lobrano", - author_email="c.lobrano@gmail.com", - license="GPL3", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Topic :: Utilities", - ], - install_requires=[ - "docopt", - "PyYaml", - "terminaltables", - "parsedatetime", - "raffaello", - ], - extras_require={ - "dev": ["pytest>=7.0", "twine>=4.0.2"], - }, - entry_points={"console_scripts": ["lets=cli:main"]}, - include_package_data=True, - keywords=["productivity", "GTD", "time tracker"], - py_modules=[ - "app", - "cli", - "configuration", - "handlers", - "log", - "tasks", - "timetoolkit", - ], -)