Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

即正式发布之后再发现有问题,即便删除了那个包,已经用过的名字(比如apache-iotdb 0.911.1)也不可再用于重新上传了。


自己电脑上需要安装python3、pip3;安装后,还需要安装setuptools和wheel和twine

...

python3 -m pip install --user --upgrade twine

我执行上面这个指令时候,报错: creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c build/temp.linux-x86_64-3.6/_openssl.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.linux-x86_64-3.6/_openssl.c:22:24: fatal error: pyconfig.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
解决办法:sudo apt install python3.6-dev (我的python是3.6版本)

然后,在整个项目编译后(事实上执行完service-rpc的generate-sources后就行),进入service-rpc然后,在整个项目编译后,进入client-py/target/generate-sources-python文件夹。pypi文件夹。

(注意:iotdb/client-py(注意:incubator-iotdb/service-rpc/src/pypi/setup.py和incubator-iotdbpy和iotdb/serviceclient-rpcpy/src/pypi/README.md中的版本号、链接等,应该在上述第2步“准备发布版本”就已完成更新。)


如果是第一次发布,可以在测试仓库进行实验:

控制台运行:python3 python3 setup.py sdist bdist_wheel

然后就可以发布了:

如果是第一次发布,可以在测试仓库进行实验:

python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*

...

一切OK,就可以正式发布了:(注:如果之前为了测试修改过setup.py,这里记得把setup.py里的name改回来重新生成dist文件夹)

控制台运行:python3 setup.py sdist bdist_wheel

python3 -m twine upload  dist/*

...