Delete PUBLISHING.md
Browse files- PUBLISHING.md +0 -81
PUBLISHING.md
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
# Publishing to PyPI
|
2 |
-
|
3 |
-
This guide explains how to build and publish the `efficient-context` package to PyPI.
|
4 |
-
|
5 |
-
## Prerequisites
|
6 |
-
|
7 |
-
1. Create an account on PyPI: https://pypi.org/account/register/
|
8 |
-
2. Install build and twine packages:
|
9 |
-
|
10 |
-
```bash
|
11 |
-
pip install build twine
|
12 |
-
```
|
13 |
-
|
14 |
-
## Build the Package
|
15 |
-
|
16 |
-
1. Navigate to the project directory:
|
17 |
-
|
18 |
-
```bash
|
19 |
-
cd /path/to/efficient-context
|
20 |
-
```
|
21 |
-
|
22 |
-
2. Build the distribution packages:
|
23 |
-
|
24 |
-
```bash
|
25 |
-
python -m build
|
26 |
-
```
|
27 |
-
|
28 |
-
This will create a directory called `dist` containing both `.tar.gz` (source distribution) and `.whl` (built distribution) files.
|
29 |
-
|
30 |
-
## Upload to TestPyPI (Recommended)
|
31 |
-
|
32 |
-
Before publishing to the main PyPI repository, it's a good practice to test on TestPyPI:
|
33 |
-
|
34 |
-
```bash
|
35 |
-
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
36 |
-
```
|
37 |
-
|
38 |
-
You'll be prompted for your TestPyPI username and password.
|
39 |
-
|
40 |
-
Then install from TestPyPI to verify it works:
|
41 |
-
|
42 |
-
```bash
|
43 |
-
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple efficient-context
|
44 |
-
```
|
45 |
-
|
46 |
-
## Upload to PyPI
|
47 |
-
|
48 |
-
Once you've verified everything works correctly, upload to the actual PyPI:
|
49 |
-
|
50 |
-
```bash
|
51 |
-
python -m twine upload dist/*
|
52 |
-
```
|
53 |
-
|
54 |
-
You'll be prompted for your PyPI username and password.
|
55 |
-
|
56 |
-
## Verify Installation
|
57 |
-
|
58 |
-
After uploading, verify that your package can be installed from PyPI:
|
59 |
-
|
60 |
-
```bash
|
61 |
-
pip install efficient-context
|
62 |
-
```
|
63 |
-
|
64 |
-
## Updating the Package
|
65 |
-
|
66 |
-
To update the package:
|
67 |
-
|
68 |
-
1. Update the version number in `setup.py`
|
69 |
-
2. Rebuild the package: `python -m build`
|
70 |
-
3. Upload to PyPI again: `python -m twine upload dist/*`
|
71 |
-
|
72 |
-
## GitHub Integration
|
73 |
-
|
74 |
-
If your code is hosted on GitHub, you may want to set up GitHub Actions to automatically build and publish your package when you create a new release. The code for this project is available at: https://github.com/biswanathroul/efficient-context
|
75 |
-
|
76 |
-
## Tips
|
77 |
-
|
78 |
-
- Always increment the version number in `setup.py` before publishing a new version
|
79 |
-
- Keep your PyPI credentials secure
|
80 |
-
- Include comprehensive documentation and examples in your package
|
81 |
-
- Add proper classifiers in `setup.py` for better searchability
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|