You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This repo contains three files that you may need to amend and copy to your Githu
21
21
-``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
22
22
-``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).
23
23
24
-
### Configuring publish-to-pypi.yml
24
+
### `publish-to-pypi.yml` configuration
25
25
26
26
Open the file. You will notice a section which looks like this:
27
27
@@ -42,6 +42,62 @@ env:
42
42
43
43
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.
44
44
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
0 commit comments