Skip to content

Installation fails if setuptools_scm<3.2.0 is installed #12

@MattFisher

Description

@MattFisher

Description

Installing newrelic==5.16.0.145 fails if a version of setuptools_scm is installed that does not support the git_describe_command option introduced in v3.2.0

In our use case, it's not clear what's causing this old version to be installed, so it's not obvious where to rectify the problem.

Changing setup_requires in setup.py to ['setuptools_scm>=3.2.0'], should hopefully work.

> pip install setuptools_scm==3.1.0
Collecting setuptools_scm==3.1.0
  Downloading setuptools_scm-3.1.0-py2.py3-none-any.whl (23 kB)
Installing collected packages: setuptools-scm
Successfully installed setuptools-scm-3.1.0

> pip --no-cache-dir install newrelic==5.16.0.145

Collecting newrelic==5.16.0.145
  Downloading newrelic-5.16.0.145.tar.gz (548 kB)
     |████████████████████████████████| 548 kB 8.2 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /{...}/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/setup.py'"'"'; __file__='"'"'/private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-pip-egg-info-50pfyx8a
         cwd: /private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/
    Complete output (23 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/setup.py", line 239, in <module>
        run_setup(with_extensions=True)
      File "/private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/setup.py", line 208, in run_setup
        _run_setup()
      File "/private/var/folders/c5/03fzs2ld3z18vnhg06wj8kzc0000gn/T/pip-install-iz2r6kus/newrelic/setup.py", line 194, in _run_setup
        setup(**kwargs_tmp)
      File "/{...}/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/{...}/lib/python3.6/site-packages/setuptools/dist.py", line 430, in __init__
        k: v for k, v in attrs.items()
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/{...}/lib/python3.6/site-packages/setuptools/dist.py", line 721, in finalize_options
        ep(self)
      File "/{...}/lib/python3.6/site-packages/setuptools/dist.py", line 728, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "/{...}/lib/python3.6/site-packages/setuptools_scm/integration.py", line 23, in version_keyword
        dist.metadata.version = get_version(**value)
    TypeError: get_version() got an unexpected keyword argument 'git_describe_command'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Expected Behavior
Install should complete successfully, or give a useful error message.

Steps to Reproduce
In a new virtualenv,
pip install setuptools_scm==3.1.0
pip install newrelic==5.16.0.145

Your Environment
Observed on macOS 10.15.5 and Ubuntu 16.04 using Python 3.6
Install succeeds with setuptools_scm not installed, or setuptools_scm>=3.2.0 installed, or when installing newrelic<=5.16.0.145.
Install fails for newrelic==5.16.0.145 with setuptools_scm<3.2.0 installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect or flawed agent behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions