py -m pip install --upgrade pip
.
└── your_pkg_name/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.py
├── src/
│ └── example_package/
│ ├── __init__.py
│ └── example.py
└── tests/
def add_one(number):
return number + 1
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="pkg_name",
version="0.0.x",
author="author name,
author_email="contact@email.com",
description="An EDA & modellling assist library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://something.com/come/here",
project_urls={
"Bug Tracker": "https://something.com/go/there",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"": "src"},
install_requires = ["pandas", "numpy","matplotlib","pandas", "seaborn", "plotly", "sklearn"],
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",
)
# Example Package
This is a simple example package. You can use [Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.
Copyright (c) 2018 The Python Packaging Authority
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
.
└── your_pkg_name/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.py <==== update version here
├── src/
│ └── example_package/
│ ├── __init__.py
│ └── example.py
└── Tests
.
└── your_pkg_name/ <==== Open cmd here
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│ └── example_package/
│ ├── __init__.py
│ └── example.py
└── Tests
py -m pip install --upgrade build
py -m build
py -m pip install --upgrade twine
py -m twine upload --repository testpypi dist/*
your_pkg_name 0.0.1b1
pip install -i https://test.pypi.org/simple/ your_pkg_name
conda activate new_env_name
pip install -i https://test.pypi.org/simple/ your_pkg_name
from your_pkg_name import example
example.add_one(2)
.
└── your_name_pkg/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.py <==== update version here
├── src/
│ └── example_package/
│ ├── __init__.py
│ └── example.py
└── Tests
py -m build
py -m twine upload dist/*
pip uninstall your_name_pkg
And pip install the latest package from PyPi
Projects page
py
from example_package import example
example.add_one(2)
Something