Mercurial > hgrepos > Python2 > PyMuPDF
comparison setup.py @ 44:0a8b06e38e19
Need "packaging" at wheel build time too.
Parsing of version_p into a tuple now is done at build time.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 11 Oct 2025 17:16:23 +0200 |
| parents | 71bcc18e306f |
| children | b74429b0f5c4 |
comparison
equal
deleted
inserted
replaced
| 43:202a1f38a622 | 44:0a8b06e38e19 |
|---|---|
| 771 try: | 771 try: |
| 772 return int(text) | 772 return int(text) |
| 773 except Exception: | 773 except Exception: |
| 774 return 0 | 774 return 0 |
| 775 swig_version_tuple = tuple(int_or_0(i) for i in swig_version.split('.')) | 775 swig_version_tuple = tuple(int_or_0(i) for i in swig_version.split('.')) |
| 776 version_p_tuple = tuple(int_or_0(i) for i in version_p.split('.')) | 776 import packaging.version |
| 777 version_p_tuple = packaging.version.Version(version_p).release | |
| 777 log(f'{swig_version=}') | 778 log(f'{swig_version=}') |
| 778 text = '' | 779 text = '' |
| 779 if os.path.isdir(mupdf_location): | 780 if os.path.isdir(mupdf_location): |
| 780 mupdf_location = mupdf_location.rstrip('/') | 781 mupdf_location = mupdf_location.rstrip('/') |
| 781 text += 'mupdf_location = ' + repr(os.path.basename(mupdf_location)) + '\n' | 782 text += 'mupdf_location = ' + repr(os.path.basename(mupdf_location)) + '\n' |
| 1471 print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.') | 1472 print(f'msys2: pip install of swig does not build; assuming `pacman -S swig`.') |
| 1472 elif openbsd: | 1473 elif openbsd: |
| 1473 print(f'OpenBSD: pip install of swig does not build; assuming `pkg_add swig`.') | 1474 print(f'OpenBSD: pip install of swig does not build; assuming `pkg_add swig`.') |
| 1474 else: | 1475 else: |
| 1475 ret.append( 'swig') | 1476 ret.append( 'swig') |
| 1477 # | |
| 1478 # Needed extension version parsing with a local version part. | |
| 1479 # Our FreeBSD build has a local version. | |
| 1480 # | |
| 1481 ret.append('packaging') | |
| 1476 return ret | 1482 return ret |
| 1477 | 1483 |
| 1478 | 1484 |
| 1479 if PYMUPDF_SETUP_URL_WHEEL: | 1485 if PYMUPDF_SETUP_URL_WHEEL: |
| 1480 def build_wheel( | 1486 def build_wheel( |
