Skip to content

Pip install fails with type error #86

Closed

Description

@alternativc

Platform: CentOS Linux release 7.5.1804
Python: Python 2.7.5

When installing with pip install xmlsec the setup.py fails. Below is the output:
`# pip install xmlsec
Collecting xmlsec
Using cached https://files.pythonhosted.org/packages/35/42/d7cd323c91d4706f3cc32ffe7d5f851ab8ef9898ccb350f6ba593dd8b89a/xmlsec-1.3.3.tar.gz
Requirement already satisfied: pkgconfig in /usr/lib/python2.7/site-packages (from xmlsec) (1.1.0)
Requirement already satisfied: lxml>=3.0 in /usr/lib64/python2.7/site-packages (from xmlsec) (4.2.4)
Installing collected packages: xmlsec
Running setup.py install for xmlsec ... error
Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-_uAooh/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-Sj4ENM/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-_uAooh/xmlsec/setup.py", line 60, in
'Topic :: Text Processing :: Markup :: XML'
File "/usr/lib/python2.7/site-packages/setuptools/init.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-_uAooh/xmlsec/setup.py", line 11, in run
self.patch_options()
File "/tmp/pip-install-_uAooh/xmlsec/setup.py", line 16, in patch_options
ext.define_macros.extend(xmlsec_setupinfo.define_macros())
File "xmlsec_setupinfo.py", line 48, in define_macros
macros.extend(xmlsec_config()['define_macros'])
File "xmlsec_setupinfo.py", line 111, in xmlsec_config
__XMLSEC_CONFIG = load_xmlsec1_config()
File "xmlsec_setupinfo.py", line 178, in load_xmlsec1_config
macros[i] = ('XMLSEC_CRYPTO', '"{0}"'.format(v[1]))
TypeError: 'set' object does not support item assignment

----------------------------------------

Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-_uAooh/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-Sj4ENM/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-_uAooh/xmlsec/`

All dependancies are installed as per documentation. Please advise.

Activity

  1. alternativc commented on Aug 22, 2018

    @alternativc
    Author

    More info:
    pkg-config --cflags xmlsec1
    -DXMLSEC_CRYPTO="openssl" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -D__XMLSEC_FUNCTION__=FUNCTION -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -I/usr/include/xmlsec1 -I/usr/include/libxml2

  2. bgaifullin commented on Aug 22, 2018

    @bgaifullin
    Collaborator
  3. bgaifullin commented on Aug 22, 2018

    @bgaifullin
    Collaborator

    Make new release 1.3.4 with fix

  4. alternativc commented on Aug 22, 2018

    @alternativc
    Author

    Thanks, however now I recieve the following error:
    "Installing collected packages: xmlsec
    Running setup.py install for xmlsec ... error
    Complete output from command /usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-CEh_Gx/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-RHg8KR/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    Traceback (most recent call last):
    File "", line 1, in
    File "/tmp/pip-req-build-CEh_Gx/setup.py", line 60, in
    'Topic :: Text Processing :: Markup :: XML'
    File "/usr/lib/python2.7/site-packages/setuptools/init.py", line 140, in setup
    return distutils.core.setup(**attrs)
    File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
    File "/usr/lib64/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
    File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
    File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/tmp/pip-req-build-CEh_Gx/setup.py", line 11, in run
    self.patch_options()
    File "/tmp/pip-req-build-CEh_Gx/setup.py", line 17, in patch_options
    ext.include_dirs.extend(xmlsec_setupinfo.include_dirs())
    File "xmlsec_setupinfo.py", line 77, in include_dirs
    dirs.extend(lxml.get_include())
    AttributeError: 'set' object has no attribute 'extend'"

  5. alternativc commented on Aug 22, 2018

    @alternativc
    Author

    I did a small conversion at:
    76 dirs = list(xmlsec_config()['include_dirs'])
    77 dirs.extend(lxml.get_include())
    It installs now, not sure if anything broke though

  6. bgaifullin commented on Aug 22, 2018

    @bgaifullin
    Collaborator

    Cool, could you please create a PR ?

  7. bgaifullin commented on Aug 31, 2018

    @bgaifullin
    Collaborator

    I have fixed the installation issue, but I cannot publish new release to pip since there is some privileges issues on travis. only @mehcode can resolve this.

  8. mehcode commented on Sep 1, 2018

    @mehcode
    Collaborator

    Going to look at this in a few hours tommorow

  9. mehcode commented on Sep 6, 2018

    @mehcode
    Collaborator

    @bgaifullin Permissions should be fixed. 0 idea why but apparently the repo was just disabled on Travis.

  10. hoefling commented on May 21, 2020

    @hoefling
    Member

    This shouldn't be an issue anymore since the releases are rolling again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy