作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 gradle 新手,我想用 python 创建一个 gradle 项目,我按照指南写 here我创建了这个项目。
安装没有给我任何问题,但是当我使用命令运行项目时
gradle build
..
Install pbr-0.11.0 .................................................. [STARTING]
Processing /home/.../.gradle/caches/modules-2/files-2.1/pypi/pbr/0.11.0/72801e9ffd52e7f438422a3e08b578e906cd270a/pbr-0.11.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-f2i4gbg4-build/setup.py", line 22, in <module>
**util.cfg_to_args())
File "/tmp/pip-f2i4gbg4-build/pbr/util.py", line 261, in cfg_to_args
wrap_commands(kwargs)
File "/tmp/pip-f2i4gbg4-build/pbr/util.py", line 482, in wrap_commands
for cmd, _ in dist.get_command_list():
File "/home/IASuserdev/Desktop/gradleFun/pythonGradle/build/venv/lib/python3.6/site-packages/setuptools/dist.py", line 507, in get_command_list
cmdclass = ep.resolve()
File "/home/IASuserdev/Desktop/gradleFun/pythonGradle/build/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/tmp/pip-f2i4gbg4-build/pbr/testr_command.py", line 47, in <module>
from testrepository import commands
ModuleNotFoundError: No module named 'testrepository'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-f2i4gbg4-build
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':installTestRequirements'.
> Failed to install pbr-0.11.0. Please see above output for reason, or re-run your build using ``gradle -i build`` for additional logging.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
最佳答案
我在 setup.py
中取消了对这些行的注释现在工作正常。
setup(
distclass=GradleDistribution,
package_dir={'': 'src'},
packages=find_packages('src'),
include_package_data=True,
entry_points={
'console_scripts': [
'hello_world = foo.hello:main',
],
}
)
关于python - {Py}Gradle 构建无模块名称 testrepository,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49875621/
我是 gradle 新手,我想用 python 创建一个 gradle 项目,我按照指南写 here我创建了这个项目。 安装没有给我任何问题,但是当我使用命令运行项目时 gradle build 给我
我是一名优秀的程序员,十分优秀!