Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build and package system #46

Merged
merged 8 commits into from
Jul 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout code
@@ -26,6 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade twine
pip install -r requirements.txt
pip install 'build[virtualenv]'

@@ -38,6 +38,5 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade twine
python -m twine upload dist/*

16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
.PHONY: test
test:
pytest
python -m pytest

build:
python3 -m pip install --upgrade build
python3 -m build

push_test:
python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/*

clean: clean_src
-rm -r build dist __pycache__

clean_src:
-rm -r src/__pycache__
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["setuptools>=71.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_file = "src/letsdo/__version__.py"


[project]
name = "letsdo"
authors = [
{ name="Carlo Lobrano", email="c.lobrano@gmail.com" },
]
description = "Time tracker for Command Line"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"docopt",
"PyYaml",
"terminaltables",
"parsedatetime",
"raffaello"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
]
dynamic = ["version"]

[project.scripts]
lets = "app:main"

[project.urls]
Homepage = "https://github.com/clobrano/letsdo"
Issues = "https://github.com/clobrano/letsdo/issues"