Commit Graph
156 Commits
Author SHA1 Message Date
Karolina Surma 4e0017c350 Pass command-line options as kwargs dict
Increase readability of the functions by removing listing of many
arguments.
Instead, the command-line options are passed as a dictionary until
the particular items are needed.
2021-11-03 13:32:17 +01:00
Karolina Surma c34451c560 Add tests for the default program run
Test a few packages from PyPI to the final specfile.
Store them in different location so that it's clear which one are
default.
2021-11-03 13:32:17 +01:00
Karolina Surma a332496b25 Distinguish tests with custom config modifications
The tests should cover both fully automated way of pyp2spec as well as
the custom modifications of conf2pyp (it can do more than we can
currently read from the upstream).
Mark custom tests clearly with conf2spec prefix.
2021-11-03 10:15:37 +01:00
Karolina Surma 4241adcb27 Support the new %pyproject_check_import macro
This allows to nuke the naive and error-prone generating of module names.
Support for %py3_check_import is dropped (its functionality is covered
by %pyproject_check_import).
2021-11-03 09:38:06 +01:00
Karolina Surma 2350790b81 Fix template path construction 2021-11-03 09:33:11 +01:00
Karolina Surma 857c8d71ff Extend information on how to run scripts 2021-09-29 10:05:18 +02:00
Karolina Surma 7559688b9d Add config file specification 2021-09-29 10:05:18 +02:00
Karolina Surma a42e9352ef Make command-line options nicer 2021-09-22 17:21:23 +02:00
Karolina Surma 004d2ce9f7 Update docstrings 2021-09-21 15:43:06 +02:00
Karolina Surma bfae7d67b5 Log important events with click 2021-09-21 15:43:06 +02:00
Karolina Surma 2903d14585 Add missing command-line argument 2021-09-21 15:43:06 +02:00
Karolina Surma 35118ffda7 Handle logical evaluation of None correctly 2021-09-21 15:43:06 +02:00
Karolina Surma 849ee58e17 Fix handling command-line args 2021-09-21 15:43:06 +02:00
Karolina Surma 526bb5ced1 Ask to check the generated license with the Fedora Guidelines 2021-09-21 15:43:06 +02:00
Karolina Surma 083064e29c Refactor is_url -> is_package-name 2021-09-21 15:43:06 +02:00
Karolina Surma 192b6ef1a2 Raise UsageError when License is missing 2021-09-20 09:02:05 +02:00
Karolina Surma fa3de80ea8 Use archive name as %pypi_source argument 2021-09-15 09:15:55 +02:00
Karolina Surma da9ddefe57 Update README 2021-09-14 17:08:39 +02:00
Karolina Surma ad0d63578e Unify formatting with black 2021-09-14 16:55:32 +02:00
Karolina Surma ede0b143ba Create user facing pyp2spec generating both parts together 2021-09-14 16:55:32 +02:00
Karolina Surma 61b7c6a999 Make create_config_contents more readable 2021-09-14 16:55:32 +02:00
Karolina Surma b7dc8a2f76 Refactor: PyPI data are stored in a class now 2021-09-14 16:55:32 +02:00
Karolina Surma c4710f8992 Ensure the created files are removed when tests fail 2021-09-14 16:55:32 +02:00
Karolina Surma 8e3d0e9645 Use betamax cassettes to record & replay requests to PyPI 2021-09-14 16:55:32 +02:00
Karolina Surma 6281df9766 Provide default description if not set through CLI 2021-09-14 08:55:08 +02:00
Karolina Surma 04d88798a6 Decide on package source based on package name - only PyPI now 2021-09-13 10:36:51 +02:00
Karolina Surma 069b0b980a Get basic package info from PyPI 2021-09-13 09:30:24 +02:00
Karolina Surma 0dfa2440f7 Save empty config file 2021-09-13 08:42:53 +02:00
Karolina Surma f53ef4ee7f Provide modules as list, there may be more of them 2021-09-13 08:33:49 +02:00
Karolina Surma 5a67bce75e Runtime BR's are implicitly required 2021-09-13 08:20:12 +02:00
Karolina Surma dbca600ac1 Improve template formatting 2021-09-09 12:16:52 +02:00
Karolina Surma a56993c468 Improve template - %doc nad %license are optional 2021-09-09 12:16:17 +02:00
Karolina Surma 2069fa03ad Improve validation - don't try to be omnipotent 2021-09-09 11:22:22 +02:00
Karolina Surma 615df7d5df Make it possible to set custom output for the spec file 2021-09-06 10:24:29 +02:00
Karolina Surma 293ae7427f Implement config file validation 2021-09-02 13:12:34 +02:00
Karolina Surma 57ac75a838 Clean up after test execution 2021-09-02 13:10:36 +02:00
Karolina Surma 8f3ff493ac Rename expected files so they match the generated ones 2021-09-02 13:09:48 +02:00
Karolina Surma c42bf66529 Add python-aioflo config and specfile to tests 2021-09-01 19:13:29 +02:00
Karolina Surma 74d8f70bf6 Add python-boutdata test config and expected spec file 2021-09-01 17:44:02 +02:00
Karolina Surma cf392c25a0 Improve formatting of BuildRequires 2021-09-01 17:32:39 +02:00
Karolina Surma ec886bd215 Rename directory with expected spec files
This way it indicates explicitly the purpose of its contents.
2021-09-01 17:32:39 +02:00
Karolina Surma 0c8b2dbc1d Refactor generating %check section 2021-09-01 17:32:39 +02:00
Karolina Surma ad56d7193b Refactor generating extra BR's to avoid space hell 2021-09-01 12:07:08 +02:00
Karolina Surma 1052ac25f8 Flatten the config file structure 2021-09-01 10:51:44 +02:00
Karolina Surma 5043bc63d5 Make the specs actually buildable 2021-08-25 09:29:36 +02:00
Karolina Surma d388433065 Introduce archive name as another key 2021-08-24 13:39:07 +02:00
Karolina Surma 8a94dbf001 Use file_regression to generate the files to compare
This shall make the maintenance of data files a little easier in the
future.
2021-08-24 13:24:41 +02:00
Karolina Surma 5de54f32ea Generate %{_bindir}/ if the package provides binary_files 2021-08-24 13:17:18 +02:00
Karolina Surma 05c2758b4f Handle situations where no extra BR's are required
Generating extra BR's is optional.
2021-08-24 13:17:18 +02:00
Karolina Surma 0e2ad98e0a Add unwanted tests to %check section 2021-08-24 13:17:18 +02:00