Skip to content

Commit

Permalink
Merge branch 'feature/novo-cnpj-bot' of https://github.com/gersonfrei…
Browse files Browse the repository at this point in the history
  • Loading branch information
gersonfreire committed Nov 13, 2024
2 parents 5e85c84 + 902aa15 commit 86babf9
Show file tree
Hide file tree
Showing 6 changed files with 369 additions and 88 deletions.
82 changes: 31 additions & 51 deletions docs/deploy_module.md → docs/deploy/deploy_module.md
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
Expand All @@ -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.
Loading

0 comments on commit 86babf9

Please sign in to comment.