بيئة
وصف
أريد استخدام محدد متطلبات VCS في قسم 'install_requires'
من ملف setup.py
، مثل git+git://github.com/...
.
فشل python setup.py install --user
مع ظهور رسالة الخطأ هذه:
خطأ في أمر إعداد goblin: يجب أن يكون "install_requires" سلسلة أو قائمة سلاسل تحتوي على محددات صالحة لمتطلبات المشروع / الإصدار ؛ مطلب غير صالح ، خطأ التحليل في "'+ git: // g '"
سلوك متوقع
أتوقع نجاح التثبيت وتثبيت التبعية تمامًا كما هو محدد في setup.py
.
كيفية التكاثر
استخدم هذا الملف setup.py
من https://github.com/kkom/goblin/blob/4d112b95dfd2374363b4617b08d3f0689957ea73/setup.py :
"""Python toolkit for Tinker Pop 3 Gremlin Server."""
import os
from setuptools import find_packages, setup
__author__ = 'Jeffrey Phillips Freeman'
__email__ = '[email protected]'
__license__ = 'Apache License, Version 2.0'
__copyright__ = 'Copyright 2017, CleverThis, Inc. and contributors'
__credits__ = ['David M. Brown - Project founder']
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='goblin',
version='2.2.4',
license=__license__,
author=__author__,
author_email=__email__,
description='Goblin OGM for the Tinkerpop 3 Stack,',
long_description_content_type="text/markdown",
long_description=long_description,
url='http://goblin-ogm.com',
download_url='https://github.com/goblin-ogm/goblin/archive/v2.2.4.tar.gz',
include_package_data=True,
keywords=['Tinkerpop', 'Tinkerpop3', 'gremlin', 'gremlin-python', 'asyncio', 'graphdb', 'ogm', 'orm'],
packages=find_packages(),
python_requires='>=3.5',
install_requires=[
'git+git://github.com/kkom/aiogremlin.git<strong i="31">@301c9d1dd0cf07b50934c8df2b51084acea86cd7</strong>',
],
test_suite='tests',
setup_requires=[
'pytest-runner>=2.6.2',
],
tests_require=['check-manifest>=0.25',
'isort>=4.2.2',
'pydocstyle>=1.0.0',
'pytest-asyncio>=0.8.0',
'pytest-cache>=1.0',
'pytest-cov>=2.5.1',
'pytest-pep8>=1.0.6',
'pytest-timeout>=1.3.4',
'pytest>=3.2.1',
'uvloop>=0.8.1',
'mock'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
# uncomment if you test on these interpreters:
# 'Programming Language :: Python :: Implementation :: IronPython',
# 'Programming Language :: Python :: Implementation :: Jython',
# 'Programming Language :: Python :: Implementation :: Stackless',
'Programming Language :: Python :: Implementation :: PyPy'
]
)
انتاج |
root<strong i="36">@d6698cc1fa7a</strong>:/workspaces/goblin# python setup.py install --user
error in goblin setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid requirement, parse error at "'+git://g'"
ملاحظات إضافية
إنني أدرك أن تثبيت التبعيات بدقة في 'install_requires'
هو مضاد كامل.
أفعل ذلك فقط لأنني أصلح خطأ حظر في aiogremlin
، وهي تبعية goblin
- الحزمة التي أستخدمها في برنامجي.
أحاول أيضًا حل هذه المشكلة بطريقة مختلفة ، إذا كنت مهتمًا: https://github.com/jazzband/pip-tools/issues/1111
مرحبًا بكم ، أعتقد أن التنسيق الصحيح لتبعية VCS سيكون install_requires=['aiogremlin @ git+...
. بالإضافة إلى استخدام git+git
لأسباب أمنية (8f0dbec5734c5197c3b7070987814b584e3f31a6) ، بالنسبة لـ GitHub ، يوصى باستخدام git+https
بدلاً من ذلك. نأمل أن يحل هذا المشكلة لك.
شكرًا @ McSinyx ، لقد حل هذا الأمر!
ونعم - نقطة جيدة حول مكاسب الأمان من استخدام https
!
في الواقع ، يحل الحل الخاص بك أيضًا مشكلتي في المشكلة الأخرى: https://github.com/jazzband/pip-tools/issues/1111
فوز ثلاثي! McSinyx شكرا!
التعليق الأكثر فائدة
مرحبًا بكم ، أعتقد أن التنسيق الصحيح لتبعية VCS سيكون
install_requires=['aiogremlin @ git+...
. بالإضافة إلى استخدامgit+git
لأسباب أمنية (8f0dbec5734c5197c3b7070987814b584e3f31a6) ، بالنسبة لـ GitHub ، يوصى باستخدامgit+https
بدلاً من ذلك. نأمل أن يحل هذا المشكلة لك.