GithubHelp home page GithubHelp logo

Comments (3)

jfolz avatar jfolz commented on June 15, 2024 1

Thanks! I extended it a bit:

import itertools as it
from cibuildwheel.util import selector_matches

versions = [
    'cp36',
    'cp37',
    'cp38',
    'cp39',
    'cp310',
    'cp311',
    'cp312',
    'cp313',
    'cp319',
    'cp320',
    'cp325',
    'cp399',
    'cp40',
    'cp99',
    'cp999',
]

skip_rule = "cp{31[!01],3[!01]?,[!3]*}-win32"

for (v, p) in it.product(versions, ('win_amd64', 'win32')):
    s = f'{v}-{p}'
    if selector_matches(skip_rule, s):
        print(s)

Output:

cp312-win32
cp313-win32
cp319-win32
cp320-win32
cp325-win32
cp399-win32
cp40-win32
cp99-win32
cp999-win32

I think this is more than sufficient to prevent y2k-ing myself.

from cibuildwheel.

joerick avatar joerick commented on June 15, 2024

Good question! fnmatch supports [seq] and [!seq] syntax, so you could do something like

skip = "{cp31[!01],cp3[2345]?}-win32"
             ^        ^
Skips cp31*, except   |
  cp310 and cp311     |
                      Skips cp32+

from cibuildwheel.

joerick avatar joerick commented on June 15, 2024

p.s. you can verify what's happening like this-

>>> from cibuildwheel.util import selector_matches
>>> some_selectors = ['cp312-win_amd64', 'cp312-win32', 'cp311-win32', 'cp39-win32', 'cp325-win32']
>>> [s for s in some_selectors if not selector_matches("{cp31[!01],cp3[2345]?}-win32", s)]
['cp312-win_amd64', 'cp311-win32', 'cp39-win32']

from cibuildwheel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.