Skip to content

Commit cea76ac

Browse files
Update README.md
1 parent 6138fcd commit cea76ac

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

README.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This repo contains three files that you may need to amend and copy to your Githu
2121
- ``setup.py``: this is a regular Python ``setup.py`` file; amend the file content with your package information and then save the file in your repo's root directory
2222
- ``publish-to-pypi.yml``: Edit this file, amend the configuration settings (see next chapter) and then save the file in your repo's Github Actions directory (``.github/workflows``). You may also need to activate the new workflow once you have installed it - see [documentation on Github](https://docs.github.com/en/actions).
2323

24-
### Configuring publish-to-pypi.yml
24+
### `publish-to-pypi.yml` configuration
2525

2626
Open the file. You will notice a section which looks like this:
2727

@@ -42,6 +42,62 @@ env:
4242
4343
Replace the placeholder for the source file with the relative path to your Python file _which contains the version information_. Amend the RegEx and the Python version, if necessary.
4444
45+
### `setup.py` configuration
46+
47+
Open the file. You will need to pupulate the header fields:
48+
49+
```python
50+
# source path for the class' package. Amend if necessary
51+
PACKAGE_SOURCE_DIR = "path/to/class/directory"
52+
53+
# Amend this section with your custom data
54+
PACKAGE_NAME="package-name"
55+
DESCRIPTION = "package-description"
56+
AUTHOR = "author-name"
57+
AUTHOR_EMAIL = "author@email.com"
58+
URL = "https://www.url.com/to/my/repository"
59+
# https://pypi.org/classifiers/
60+
CLASSIFIERS = [
61+
"Intended Audience :: Developers",
62+
"Programming Language :: Python",
63+
"Programming Language :: Python :: 3",
64+
"Topic :: Software Development",
65+
"Operating System :: OS Independent",
66+
"Development Status :: 4 - Beta",
67+
"Framework :: Robot Framework",
68+
]
69+
INSTALL_REQUIRES=[
70+
"package_1",
71+
"package_2"
72+
]
73+
KEYWORDS=[
74+
"Notifications",
75+
"Notification Service",
76+
"Push Notifications",
77+
"Notifier",
78+
"Alerts",
79+
"Robot Framework"
80+
]
81+
LICENSE="GNU General Public License v3 (GPLv3)"
82+
```
83+
84+
- `PACKAGE_SOURCE_DIR` - the path to your package source directory, containing your Python code
85+
- `PACKAGE_NAME` - (future) PyPi package name
86+
- `DESCRIPTION` - PyPi package short dkescription
87+
- `AUTHOR` and `AUTHOR_EMAIL` - self-explanatory
88+
- `URL` - URL to your package`s repository on GitHub
89+
- `CLASSIFIERS` - List of classifiers; have a look at [the official list](https://pypi.org/classifiers/)
90+
- `INSTALL_REQUIRES` - Python packages that are required by your package
91+
- `KEYWORDS` - Keywords which are associated with your Python package
92+
93+
> [!INFO]
94+
> When being run as part of the provided GitHub workflow, `setup.py` will receive the future Python package's version info from the GitHub workflow and store it in the `GITHUB_PROGRAM_VERSION` variable. If you intend to install the package directly via `pip install`, you need to set the version info directly in the setup file or the process will fail.
95+
96+
Necessary steps for a manual usage:
97+
98+
- open `setup.py` and assign a version number to the `GITHUB_PROGRAM_VERSION` variable
99+
- `pip install git+https://github.com/my-repository-name@my-branch#egg=my-package-name`
100+
45101
## Running the Github Action
46102

47103
This Github action will do the following __whenever a new release/pre-release is published for the 'master' branch__:

0 commit comments

Comments
 (0)