Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 3.0.4 (PyPi) fails building octavia due to setuptools 67+ being very strict on PEP 440 #652

Closed
3 tasks done
ajkavanagh opened this issue Mar 9, 2023 · 1 comment
Assignees

Comments

@ajkavanagh
Copy link
Contributor

ajkavanagh commented Mar 9, 2023

Checklist

  • Confirmed this is an issue with charm-tools, not charmstore-client
  • Provide versions of tools used
  • Described the feature or ways to replicate the issue

What version am I running?

I'm using 3.0.4 from PyPi inside charmcraft.

I am using: Ubuntu 22.04

Versions of relevant modules within charm-build run:

:: charmtools.build.tactics: Packages in buildvenv:                                                                                                                                                                    
:: Package    Version                                                                                                                                                                                                  
:: ---------- -------                                                                                                                                                                                                  
:: pip        23.0.1                                                                                                                                                                                                   
:: setuptools 67.4.0                                                                                                                                                                                                   
:: wheel      0.38.4 

Issue/Feature

Charm build fails with:

:: Collecting kombu==5.2.4                                                                                                                                                                                             
::   Downloading kombu-5.2.4.tar.gz (423 kB)                                                                                                                                                                           
::      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 423.4/423.4 kB 4.2 MB/s eta 0:00:00                                                                                                                                    
::   Preparing metadata (setup.py): started                                                                                                                                                                            
::   Preparing metadata (setup.py): finished with status 'error'                                                                                                                                                       
::   error: subprocess-exited-with-error                                                                                                                                                                               
::                                                                                                                                                                                                                     
::   × python setup.py egg_info did not run successfully.                                                                                                                                                              
::   │ exit code: 1                                                                                                                                                                                                    
::   ╰─> [5 lines of output]                                                                                                                                                                                           
::       /root/snap/charmcraft/common/tmp7pqi369d/lib/python3.10/site-packages/setuptools/config/setupcfg.py:520: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.   
::         warnings.warn(msg, warning_class)                                                                                                                                                                           
::       error in kombu setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after name and no valid version specifier)                                                                                                                                                                                                                      
::           pytz>dev                                                                                                                                                                                                  
::               ^                                                                                                                                                                                                     
::       [end of output]

Apparenty, pytz>dev is not a valid PEP440 requirements string. It would need to be pytz>0.dev.0. Anyway, I can't change that package as it is buried many dependencies down.

setuptools >= 67 seems to have become very strict. I think, but will test, that setuptools < 67 will still work with non PEP440 valid requirement lines.

Possible fix

The possible fixes are to just pin setuptools < 67 for the moment, or to provide an option to allow the pip requirement to be passed as an option. I'll investigate both those issues.

@ajkavanagh ajkavanagh self-assigned this Mar 9, 2023
@ajkavanagh ajkavanagh changed the title version 3.0.4 (PyPi) fails building octavia due to pip ?? being very strict on PEP 440 version 3.0.4 (PyPi) fails building octavia due to setuptools 67+ being very strict on PEP 440 Mar 9, 2023
ajkavanagh added a commit to ajkavanagh/charm-tools that referenced this issue Mar 9, 2023
PEP-440 is more strict about requirement lines.  As an example:

    pytz>dev

is non-compliant, but is in 5.2.4 of kombu's requirements.  This breaks
building wheelhouses from source (such as the octavia charm).  This
patch pins pip and setuptools to the latest versions that will defintely
still allow PEP-440 non-compliant packages to install.

The option --upgrade-buildvenv-core-deps can be used to override this
and will install the latest versions of pip and setuptools available.

Fixes-Bug: juju#652
javacruft pushed a commit that referenced this issue Mar 14, 2023
PEP-440 is more strict about requirement lines.  As an example:

    pytz>dev

is non-compliant, but is in 5.2.4 of kombu's requirements.  This breaks
building wheelhouses from source (such as the octavia charm).  This
patch pins pip and setuptools to the latest versions that will defintely
still allow PEP-440 non-compliant packages to install.

The option --upgrade-buildvenv-core-deps can be used to override this
and will install the latest versions of pip and setuptools available.

Fixes-Bug: #652
@ajkavanagh
Copy link
Contributor Author

Closed by #653

ajkavanagh added a commit to ajkavanagh/charm-tools that referenced this issue Mar 15, 2023
to allow PEP-440 non compliance.

(backported relevant parts from master branch in juju#653)

PEP-440 is more strict about requirement lines.  As an example:

    pytz>dev

is non-compliant, but is in 5.2.4 of kombu's requirements.  This breaks
building wheelhouses from source (such as the octavia charm).  This
patch pins pip and setuptools to the latest versions that will defintely
still allow PEP-440 non-compliant packages to install.

The option --upgrade-buildvenv-core-deps can be used to override this
and will install the latest versions of pip and setuptools available.

Fixes-Bug: juju#652
ajkavanagh added a commit to ajkavanagh/charm-tools that referenced this issue Mar 15, 2023
to allow PEP-440 non compliance.

(backported relevant parts from master branch in juju#653)

PEP-440 is more strict about requirement lines.  As an example:

    pytz>dev

is non-compliant, but is in 5.2.4 of kombu's requirements.  This breaks
building wheelhouses from source (such as the octavia charm).  This
patch pins pip and setuptools to the latest versions that will defintely
still allow PEP-440 non-compliant packages to install.

The option --upgrade-buildvenv-core-deps can be used to override this
and will install the latest versions of pip and setuptools available.

Fixes-Bug: juju#652
javacruft pushed a commit that referenced this issue Mar 15, 2023
to allow PEP-440 non compliance.

(backported relevant parts from master branch in #653)

PEP-440 is more strict about requirement lines.  As an example:

    pytz>dev

is non-compliant, but is in 5.2.4 of kombu's requirements.  This breaks
building wheelhouses from source (such as the octavia charm).  This
patch pins pip and setuptools to the latest versions that will defintely
still allow PEP-440 non-compliant packages to install.

The option --upgrade-buildvenv-core-deps can be used to override this
and will install the latest versions of pip and setuptools available.

Fixes-Bug: #652
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant