Python setup.py, How to install package by your self

less than 1 minute read

Code

from setuptools import setup, find_packages

with open('requirements.txt', mode="r", encoding="utf8") as f:
    required = f.read().splitlines()

setup(
    name='cuefig',
    version='0.0.2',
    url='https://github.com/FavorMylikes/cuefig',
    license='MIT License',
    author='麦丽素',
    author_email='[email protected]',
    description='A config framework that you can cue and hint quickly.',
    package_data={"": ["*.yaml"], },
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    install_requires=required,
    packages=find_packages(),
    python_requires=">=3.7",
)
  • tree
│   LICENSE
│   main.py
│   README.md
│   requirements.txt
│   setup.py
│
├───cuefig
│   │   __init__.py
│   │
│   ├───logger
│   │       logging.yaml
│   │       __init__.py
│   │
│   └───utils
│           __init__.py


  • install
python ./setup.py install
  • deploy
python setup.py check
python -m build
python -m twine upload --skip-existing --repository pypi dist/* --verbose

Hint

Reference

Categories:

Updated: