Python 如何重命名包名
当我通过Python 如何重命名包名,python,Python,当我通过粘贴器 如果我想将long\u term\u streaming\u monitor更改为long\u term\u monitor 我应该更改哪些文件以及如何更改 谢谢 setup.py from setuptools import setup, find_packages import sys, os here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.
粘贴器
如果我想将long\u term\u streaming\u monitor
更改为long\u term\u monitor
我应该更改哪些文件以及如何更改
谢谢
setup.py
from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
NEWS = open(os.path.join(here, 'NEWS.txt')).read()
version = '0.3'
install_requires = [
# List your project dependencies here.
# For more details, see:
# http://packages.python.org/distribute/setuptools.html#declaring-dependencies
]
setup(name='long_term_streaming_monitor/',
version=version,
description="",
long_description=README + '\n\n' + NEWS,
classifiers=[
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
],
keywords='',
url='',
license='',
packages=find_packages('src'),
package_dir = {'': 'src'},include_package_data=True,
zip_safe=False,
install_requires=install_requires,
entry_points={
'console_scripts':
['long_term_streaming_monitor/=long_term_streaming_monitor:main']
}
)
包树视图
├── [Mar 21 16:03] HACKING.txt
├── [Mar 21 16:03] MANIFEST.in
├── [Mar 21 16:03] NEWS.txt
├── [Mar 21 16:03] README.rst
├── [Mar 21 16:03] bootstrap.py
├── [Mar 21 16:03] buildout.cfg
├── [Mar 27 18:07] docs
│ ├── [Mar 25 11:56] Makefile
│ ├── [Mar 25 11:58] _build
│ ├── [Mar 25 11:56] _static
│ ├── [Mar 25 11:56] _templates
│ ├── [Mar 25 11:56] conf.py
│ ├── [Mar 25 11:55] html
│ ├── [Mar 25 11:55] index.rst
│ ├── [Mar 25 11:55] long_term_streaming_monitor.rst
│ ├── [Mar 25 11:55] long_term_streaming_monitor.tests.rst
│ ├── [Mar 25 11:56] make.bat
│ ├── [Mar 25 11:55] modules.rst
│ └── [Mar 25 11:58] y.rst
├── [Mar 27 18:13] setup.py
└── [Mar 27 18:13] src
├── [Mar 27 18:13] long_term_streaming_monitor
└── [Mar 6 18:00] long_term_streaming_monitor_.egg-info
在setup.py
设置(name='long\u term\u streaming\u monitor/,…)
到
setup(name='long\u term\u monitor',…)
您不妨这样做:导入一些超级复制器\u long\u name\u thingy作为某物
不,那不是我想要的,这个包是我写的,我想重命名它的名称,所以我可以使用pip安装新的\u name\u包