tcms-api 5.3 package incompatible with Windows

假如想象 提交于 2021-02-11 15:44:01

问题


I attempted to upgrade my tcms-api library from 5.0 to 5.3 using:

pip install tcms-api --upgrade 

on a Windows 10 machine, I saw a lot of errors when trying to install the dependent package of kerberos. Even though this is old, I saw a similar set of errors. The package installation failed since the kerberos package isn't supported on Windows and I was left at tcms-api 5.0.


回答1:


Please file a bug against https://github.com/kiwitcms/tcms-api.

We can do a quick fix by providing 2 package names: tcms-api and tcms-api[kerberos]

The first one will not install the kerberos package.

The proposed workaround makes sense but changing the underlying kerberos implementation needs careful testing which isn't a quick job.

OTOH https://github.com/kiwitcms/python-social-auth-kerberos uses gssapi which seems to be the latest and most actively maintained implementation of Kerberos for Python. There is an open issue to migrate to that in tcms-api so you can contribute if you want.




回答2:


As a workaround, I was able to do the following (caveat: I haven't extensively tested my installation yet):

  • Clone the tcms-api repo from GitHub
  • Edit setup.py to change the install_requires line to use 'kerberos-sspi' rather than 'kerberos'
  • Install the following pip packages: Setuptools, Wheel, Twine
  • CD to repo folder and run: python setup.py bdist_wheel
  • That creates a package under the dist folder
  • Run pip install dist\tcms_api-5.3-py3-none-any.whl
  • Celebrate successful package install

The steps were modified from this page.

Update: I confirmed the things I need the API to do work with my custom package (create and update test runs). However, I'm in a situation where I don't need to specifically harden my Kiwi instance using kerberos authentication.



来源:https://stackoverflow.com/questions/55034499/tcms-api-5-3-package-incompatible-with-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!