Skip to content

Commit

Permalink
Merge pull request #24 from yakimka/dist
Browse files Browse the repository at this point in the history
Upload package to pypi
  • Loading branch information
yakimka authored Oct 3, 2021
2 parents 0c20d6b + c67546e commit e068383
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 8 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,39 @@ jobs:
name: codecov-umbrella
yml: ./codecov.yml
fail_ci_if_error: true

build-n-publish:
name: upload to pypi
runs-on: ubuntu-latest
needs: [ checks, build ]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ clean-pyc: ## Clean pyc files
installdev: clean ## Install dev
pip install -Ue '.[dev]'

.PHONY: sdist
sdist: clean ## Create a source distribution
python setup.py sdist
.PHONY: build
build: clean ## Create a source distribution
python setup.py sdist bdist_wheel
twine check dist/*

.PHONY: upload_test
upload_test: ## Upload package to test.pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: compile-ui
compile-ui: ## Compile *.ui to *.py
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# CherryTomato

![Screenshot](assets/screenshot.png)
![Screenshot](https://github.com/yakimka/CherryTomato/raw/master/assets/screenshot.png)

## Features

Expand Down Expand Up @@ -31,9 +31,26 @@

## Installing

`python3 setup.py install`
### pypi

Now you can run this app with command `cherry_tomato`
`pip install --user CherryTomato`

Run in terminal: `cherry_tomato` (`~/.local/bin` must be in PATH environment variable)

Also, you can install `*.desktop` file for executing CherryTomato from Application Launcher or krunner.

Just create file `~/.local/share/applications/cherrytomato.desktop` with content (change Icon section):

```
[Desktop Entry]
Type=Application
Name=CherryTomato
GenericName=Easy to use, flexible PyQt5 Pomodoro Technique timer
Icon=/home/USER/.local/lib/pythonVERSION/site-packages/CherryTomato/media/icon.png
Exec=$HOME/.local/bin/cherry_tomato
Terminal=false
Categories=Utility
```

### Arch Linux

Expand Down
16 changes: 14 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from importlib.machinery import SourceFileLoader

from pkg_resources import parse_requirements
from setuptools import find_packages
from setuptools import setup
from setuptools import find_packages, setup

module_name = 'CherryTomato'

Expand All @@ -23,13 +22,26 @@ def load_requirements(fname: str) -> list:
return requirements


with open(os.path.join(module.BASE_DIR, '..', 'README.md')) as f:
readme = f.read()

setup(
name=module_name,
version=module.__version__,
author=module.__author__,
author_email=module.__email__,
license=module.__license__,
description=module.__doc__,
long_description=readme,
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Topic :: Desktop Environment :: K Desktop Environment (KDE)',
'Topic :: Utilities',
],
url='https://github.com/yakimka/CherryTomato',
packages=find_packages(exclude=['tests', 'tests.*']),
python_requires='>=3.6',
Expand Down

0 comments on commit e068383

Please sign in to comment.