-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/novo-cnpj-bot' of https://github.com/gersonfrei…
…re/telegram-bot-framework into dev
- Loading branch information
Showing
6 changed files
with
369 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
To distribute your Python package to others, you can publish it to the Python Package Index (PyPI). Here are the steps to do that: | ||
|
||
### Pseudocode | ||
|
@@ -10,75 +9,56 @@ To distribute your Python package to others, you can publish it to the Python Pa | |
### Steps | ||
|
||
1. **Ensure you have a `setup.py` file** : Follow the previous instructions to create a `setup.py` file if you don't have one. | ||
2. **Install required tools** : Make sure you have `setuptools`, `wheel`, and `twine` installed. | ||
|
||
**pip **install** **setuptools** **wheel** **twine | ||
|
||
2. **Install required tools** : Make sure you have `setuptools`, `wheel`, and `twine` installed.`**pip ` | ||
3. **Create distribution files** : Run the following commands to create source and wheel distributions. | ||
|
||
**python **setup.py** **sdist** **bdist_wheel | ||
`python ` | ||
|
||
This will generate distribution files in the `dist` directory. | ||
|
||
4. **Upload to PyPI** : Use `twine` to upload your package to PyPI. | ||
|
||
**twine **upload** **dist/***** | ||
``` | ||
twine upload dist/* | ||
``` | ||
|
||
5. **Enter your PyPI credentials** : You will be prompted to enter your PyPI username and password. | ||
|
||
### Example `setup.py` | ||
|
||
Here's a basic example of what a `setup.py` file might look like: | ||
|
||
**from** setuptools **import** setup, find_packages | ||
|
||
**setup**( | ||
|
||
** name=**'your_package_name'**,** | ||
|
||
** version=**'0.1.0'**,** | ||
|
||
** packages=find_packages**(**)**, | ||
|
||
** install_requires=**[ | ||
|
||
** **# List your package dependencies here | ||
|
||
** **# 'some_package>=1.0.0', | ||
|
||
** **]**,** | ||
|
||
** author=**'Your Name'**,** | ||
|
||
** author_email=**'[email protected]'**,** | ||
|
||
** description=**'A brief description of your package'**,** | ||
|
||
** long_description=open**(**'README.md'**)**.read**(**)**, | ||
|
||
** long_description_content_type=**'text/markdown'**,** | ||
|
||
** url=**'**https://github.com/yourusername/your-repo**'**,** | ||
|
||
** classifiers=**[ | ||
|
||
** **'Programming Language :: Python :: 3'**,** | ||
|
||
** **'License :: OSI Approved :: MIT License'**,** | ||
|
||
** **'Operating System :: OS Independent'**,** | ||
|
||
** **]**,** | ||
|
||
** python_requires=**'>=3.6'**,** | ||
|
||
**)** | ||
``` | ||
setup( | ||
name='your_package_name', | ||
version='0.1.0', | ||
packages=find_packages(), | ||
install_requires=[ | ||
# List your package dependencies here | ||
# 'some_package>=1.0.0', | ||
], | ||
author='Your Name', | ||
author_email='[email protected]', | ||
description='A brief description of your package', | ||
long_description=open('README.md').read(), | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/yourusername/your-repo', | ||
classifiers=[ | ||
'Programming Language :: Python :: 3', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
], | ||
python_requires='>=3.6', | ||
) | ||
``` | ||
|
||
### Additional Tips | ||
|
||
* **Register on PyPI** : If you don't have a PyPI account, register at [PyPI](vscode-file://vscode-app/c:/Users/gerso/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html). | ||
* **Test your package** : Before uploading to the main PyPI, you can test your package upload using [TestPyPI](vscode-file://vscode-app/c:/Users/gerso/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html). | ||
|
||
**twine **upload** **--repository-url** **https://test.pypi.org/legacy/** **dist/***** | ||
``` | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
``` | ||
|
||
This will help ensure everything works correctly before uploading to the main PyPI. |
File renamed without changes.
Oops, something went wrong.