pip install setuptools
更多的选项可以执行 python3 setup.py --help
#-*- coding:utf-8 -*-
from setuptools import setup, find_packages
setup(
name='jasonlib',
version='0.1',
packages=find_packages(),
description='this is json's testlib',
author='jason',
author_email='jason@111.com',
url='www.test.com'
)
在步骤2创建的目录里创建项目testlib,在里面写点代码就行,需要创建__init__.py文件,这个目录是和setup.py平级的,testlib 才是可以导入的模块,例如下面的
from testlib import xxx
$python setup.py check
$python setup.py build
$python setup.py install
$python setup.py install --record installed.txt
$cat installed.txt|xargs rm -rf
参考httPS://pypi.org/project/twine/
¥498.00
¥399.00
¥29.00
¥299.00