40 Commits
Author SHA1 Message Date
Karolina Surma 26bddd8ce3 Bump version 0.12.2 -> 0.13.0 2025-07-31 10:17:42 +02:00
Karolina SurmaandKarolina Surma 40b55ee132 Generate specfiles for packages built locally
With `pyp2spec <pkgname> --path /pth/to/artifacts` a specfile will be
now generated from data available in sdist and wheel.
The `--path` option takes as a value a directory where the built artifacts
are stored.
2025-07-23 10:40:36 +02:00
demusandKarolina Surma e5c63a388c Ensure project_urls is not None when it's "project_urls": null in the json 2025-04-17 09:32:15 +02:00
demusandKarolina Surma ea34a694b6 Try project_url and package_url from the metadata before crashing 2025-04-08 09:52:41 +02:00
Karolina Surma 0a226320df Bump version 0.11.1 -> 0.12.0 2025-03-03 11:11:39 +01:00
Karolina SurmaandKarolina Surma 4a36396d23 Read extras first from provides_extra, then requires_dist (closes #57) 2025-02-25 14:56:22 +01:00
Karolina SurmaandKarolina Surma ba55c5a90a Create spec files with pyproject declarative buildsystem
This is an experimental build system added to rpm 4.20
and provisionally added to pyproject macros.
See:
https://rpm-software-management.github.io/rpm/manual/buildsystem.html
and
https://src.fedoraproject.org/rpms/pyproject-rpm-macros
(section: Provisional: Declarative Buildsystem (RPM 4.20+))
2025-02-25 09:22:23 +01:00
Karolina SurmaandKarolina Surma 2cca4d3844 Support compat packages (Closes #15)
When specified on command line, a compat package for a given version
will be created.
pyp2spec will create a specfile for the latest version matching the
compat one, e.g. for `pytest --compat 7` it will create specfile for
version 7.4.4; for `pytest --compat 7.2` - 7.2.2.
It is possible to specify both compat and specific version, e.g.:
`pytest --compat 7 --version 7.3.0`
2025-02-24 14:39:55 +01:00
Karolina Surma 68ba134aa9 Bump version 0.11.0 -> 0.11.1 2024-11-21 17:55:12 +01:00
Karolina Surma a724cdb771 Bump version 0.10.0 -> 0.11.0 2024-10-22 19:08:24 +02:00
Karolina Surma 9747b76c4f Implement PEP 625
The sdist filenames are now standardized:
- distribution name is normalized similarly to the project names, but
  with "_" instead of "-"
- version string is expected to be PEP 440 compliant
- the supported file extension is tar.gz, zip is gone
2024-10-22 17:52:24 +02:00
Karolina Surma bf70f16f6c Bump version 0.9.0 -> 0.10.0 2024-10-10 11:05:50 +02:00
Karolina Surma 661fb9b770 Bump version 0.8.0 -> 0.9.0 2024-04-11 15:56:08 +02:00
Karolina Surma 39c562f019 Bump version 0.7.0 -> 0.8.0 2023-10-11 11:11:01 +02:00
Karolina SurmaandKarolina Surma a3be9eb968 Add the changelog entry 2023-10-11 10:47:49 +02:00
Karolina Surma 0f603d69c9 Bump version 0.6.1 -> 0.7.0 2023-05-03 15:58:24 +02:00
Karolina SurmaandKarolina Surma ebd1b81075 Move to rpmautospec macros for changelog and release
rpmautospec has been present in Fedora since F35 and it's currently
a recommended way of handling the changelog and release specfile
entries: https://fedoraproject.org/wiki/Changes/rpmautospec
2023-04-25 16:24:37 +02:00
Karolina SurmaandKarolina Surma 238faa40d6 Exit script correctly on a non-existing package (fixes #30) 2023-04-25 16:24:37 +02:00
Karolina SurmaandKarolina Surma dce4344006 Convert Python license classifiers to SPDX expressions
Alongside with the license-related code the tests were significantly
refactored to run offline. The changes are intertwined and so shipped in
a single commit.
The licensing changes:
- updated Trove-Fedora mappings (removed Callaway expressions, added
  SPDX)
- delegated the compliance check of Fedora licenses to a source
  maintained by the Fedora Legal team
- the logic of license processing was moved to a dedicated module:
  license_processor

The testing changes:
- moved betamax configuration to conftest.py to achieve a reliable global setting
- mocked fedora licensing data and PyPI package data to stop making
  unnecessary requests - most of the betamax cassettes were deleted
- several tests rewritten, many added
- regenerated remaining betamax cassettes

This is a best-effort solution which can't (nor aims to) cover all edge-cases.
Unless Python adopts SPDX standard, this will always be an approximation.
2023-04-25 10:17:47 +02:00
Karolina Surma 83a3568192 Bump version 0.6.0 -> 0.6.1 2022-08-01 14:14:57 +02:00
Karolina Surma d9705f8536 Bump version 0.5.0 -> 0.6.0 2022-08-01 13:20:42 +02:00
Karolina Surma 1ace5ce889 Normalize PyPI projects' name
- Replace underscores and dots  with dashes in projects' names
Projects like sphinx_design result in python-sphinx-design.spec
and python3-sphinx-design built RPM name.
- Convert uppercase characters to lowercase
Projects like Pello result in python-pello.spec and python3-pello
built RPM name.
This conforms better with package naming guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming
2022-08-01 12:59:24 +02:00
Karolina Surma 7b6b657f77 Relicense template.spec and derived files as MIT-0 (No attribution)
Fedora Legal plans to classify CC0 as content-only license, the
recommended equivalent for code being MIT-0:
https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/RRYM3CLYJYW64VSQIXY6IF3TCDZGS6LM/
With the agreement of all contributors to the template.spec (#25), this file and
any files produced by pyp2spec are now licensed as MIT-0.
Fixes: #25
2022-07-26 16:06:10 +02:00
Karolina Surma ea39b14723 Clearly state the project's maturity as alpha 2022-06-20 13:00:13 +02:00
Karolina Surma d574544cfc Bump version 0.3.3 -> 0.4.0 2022-05-23 14:14:08 +02:00
Karolina Surma 38638cc2a0 Update documentation to reflect latest changes 2022-02-11 15:47:36 +01:00
Karolina Surma 7d7af97946 Convert PEP 440 package version to RPM scheme (Fixes #20)
- Include converter based on pyreq2rpm to create valid RPM versions
- For non-compatible versions no transformation is done, such string may
  or may not work with RPM
2022-02-11 15:47:36 +01:00
Karolina Surma c78ed80705 It's possible to declare --archful package via CLI (#10) 2022-02-11 14:15:33 +01:00
Karolina Surma 4ecfc8af80 Remove generating the runtime requirements from spec file
pyproject-rpm-macros 0.53 made `-r` the default option.
2022-02-09 10:51:38 +01:00
Karolina Surma 8c2e7d3909 Bump version 0.3.2 -> 0.3.3 2022-01-12 09:19:16 +01:00
Karolina Surma 897dba3961 Update changelog 2022-01-12 09:17:36 +01:00
Karolina Surma 11cbe83cd1 Bump version 0.3.1 -> 0.3.2 2021-12-10 11:48:10 +01:00
Karolina Surma 67266a4679 Use package_url if no project_urls are listed (Fixes: #17) 2021-12-10 10:26:53 +01:00
Karolina Surma e09cf1b5ae Bump release 0.3.0 -> 0.3.1 2021-12-09 08:24:55 +01:00
Karolina Surma 653450748d Fix %pypi_source macro when sdist is zipped 2021-12-09 08:23:33 +01:00
Karolina Surma 862dfe892d Bump version 0.2.0 -> 0.3.0 2021-12-08 17:35:49 +01:00
Karolina Surma 1296900be1 Add MANIFEST.in so that tests make it to sdist 2021-12-08 17:34:37 +01:00
Karolina Surma a45a3e0cf7 Add changelog entries 2021-12-08 17:04:46 +01:00
Karolina Surma 2515603a18 Update cassettes so tests don't send real requests 2021-12-08 17:04:46 +01:00
Karolina Surma fd2872be49 Start Changelog.md + update for 0.2.0 2021-11-29 16:24:45 +01:00