Skip to content

Commit 6729486

Browse files
PyPi scafolding
preperations for future release
1 parent c974f55 commit 6729486

File tree

6 files changed

+78
-0
lines changed

6 files changed

+78
-0
lines changed

DISTRIBUTION.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Distribution cheat sheet
2+
3+
## Check if the package is installable
4+
```console
5+
pip install .[dev]
6+
```
7+
add `[dev]` to install the `extras_require` packages, required to build a release, if you have defined them in your setup.py. Example:
8+
```python
9+
extras_require={"dev": ["twine>=4.0.2", "build>=1.0.3"]},
10+
```
11+
12+
## Old way (binairy and wheel)
13+
Create binairies
14+
```console
15+
python setup.py bdist
16+
```
17+
Create whl
18+
```console
19+
python setup.py bdist_wheel
20+
```
21+
22+
## New way (binairy and wheel)
23+
```console
24+
python -m build
25+
```
26+
27+
## Uploading
28+
Using twine, check if everything is ok
29+
```console
30+
twine check dist/*
31+
```
32+
Then upload to PyPi test or production
33+
```console
34+
twine upload -r testpypi dist/*
35+
twine upload dist/*
36+
```

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is a placeholder for a future WebGUI package
2+
3+
Please contact the maintainer for more information

setup.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from setuptools import setup, find_packages
2+
3+
with open("README.md", "r") as f:
4+
long_description = f.read()
5+
6+
setup(
7+
name="desktopwebgui",
8+
version="0.0.2",
9+
description="Create appealing desktop applications using HTML with Flask/Django/FastAPI",
10+
long_description=long_description,
11+
long_description_content_type="text/markdown",
12+
url="https://github.com/gitcodebob/DesktopWebGUI",
13+
author="Bob Reijnders",
14+
author_email="info@bobreijnders.nl",
15+
license="MIT",
16+
packages=find_packages(),
17+
# zip_safe=False,
18+
python_requires=">=3.10",
19+
extras_require={"dev": ["twine>=4.0.2", "build>=1.0.3"]},
20+
classifiers=[
21+
"License :: OSI Approved :: MIT License",
22+
"Programming Language :: Python :: 3",
23+
"Operating System :: OS Independent",
24+
],
25+
)

src/desktopwebgui/__init__.py

Whitespace-only changes.

src/desktopwebgui/example.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
""" This is a placeholder. Future package code will be placed here"""
2+
3+
4+
def add_one(number: int) -> int:
5+
return number + 1

tests/test_example.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import unittest
2+
from ..src.example_package_bobrey.example import add_one
3+
4+
5+
class AdditionTest(unittest.TestCase):
6+
def test_add_one(self) -> None:
7+
self.assertEqual(add_one(0), 1)
8+
self.assertEqual(add_one(-1), 0)
9+
self.assertEqual(add_one(99), 100)

0 commit comments

Comments
 (0)