0

I have a package that has a dependency B (sg_wrapper) which itself has a dependency C (shotgun_api3). When installing with pipenv, I have access to B (sg_wrapper), but B itself fails to import C.

This is my pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
edl = "*"
timecode="*"
sg_wrapper = {git = "git+https://gitlab.com/kickstartent/sg_wrapper.git", editable=true}

[requires]
python_version = "3.7"

This is package B setup.py

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="Shotgun wrapper",
    version="0.0.1",
    author="",
    author_email="",
    description="shotgun wrapper",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="hidden",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    python_requires='>=3.6',
    install_requires=[
        'package_name @ git+https://github.com/shotgunsoftware/python-api.git'
    ]
)
Barnabe
  • 488
  • 5
  • 18
  • `dependency_links` were declared obsolete and finally [removed](https://setuptools.readthedocs.io/en/latest/setuptools.html#dependencies-that-aren-t-in-pypi) in `pip` 19.0. The replacement for it is `install_requires` with [special syntax](https://stackoverflow.com/a/61931498/7976758) (supported since `pip` 19.1). – phd Aug 19 '20 at 17:42
  • thanks, I just changed it, no difference that I can see. – Barnabe Aug 19 '20 at 19:58

1 Answers1

1

You need to type the real package name.

install_requires=[
        'package_name @ git+https://github.com/shotgunsoftware/python-api.git'
    ]

But you typed package_name instead!!!

For example:

install_requires=[
    pycocotools @ git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
]
Rahul Iyer
  • 19,924
  • 21
  • 96
  • 190