Skip to content

Conversation

@prs513rosewood
Copy link
Contributor

I've added new versions of SCons. I fixed the pypi package attribute because it was preventing fetching of the newer archives. The older (3.1.2 and below) were fetched from Spack's mirror, so I don't know how this change affects the mirroring, feel free to suggest edits if something's wrong. Cheers!

@prs513rosewood
Copy link
Contributor Author

I followed the python version requirements from the release notes, but I realize this could fail dependency resolution for packages that specify scons@3: and python@:3.5, although I don't know if there's any scons package that has these constraints.

Copy link
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you'll need to add a url_for_version function like:

def url_for_version(self, version):
    url = 'https://files.pythonhosted.org/packages/source/{0}/{1}/{1}-{2}.tar.gz'
    if version >= Version('4.0.0'):
        name = 'SCons'
    else:
        name = 'scons'
    return url.format(name[0], name, version)

@adamjstewart adamjstewart self-assigned this Apr 26, 2022
@prs513rosewood
Copy link
Contributor Author

Thanks for the pointer on url_for_version. Interestingly, I could still install versions prior to 4.0.0, even with --no-cache, because the source archive was fetched from Spack's mirror.

@adamjstewart
Copy link
Member

Yes, we first check the local downloads cache, then check Spack's download mirror, then check the original source. If anything goes wrong with the first two we want the third to still work.

Comment on lines +35 to +36
# Python 3.5 support was dropped in SCons 4.3.0
depends_on('python@3.6:', when='@4.3.0:')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see this? The setup.cfg still says 3.5 is supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://scons.org/scons-430-is-available.html

NOTE: 4.3.0 now requires Python 3.6.0 and above. Python 3.5.x is no longer supported

The description on PyPI also mentions:

As of SCons 4.2.0 support for Python 3.5 is deprecated and will be removed with the next major release.

They may have forgotten to update that requirement everywhere.

@adamjstewart adamjstewart merged commit eb51591 into spack:develop Apr 27, 2022
@prs513rosewood prs513rosewood deleted the prs513rosewood/scons-new-versions branch April 27, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants