Commit Graph

2402 Commits

Author SHA1 Message Date
Jordan Sissel e69cdca562 v1.17.0 :) 2025-10-02 16:37:32 -07:00
Jordan Sissel 5b9d922c84
Merge pull request #2109 from jordansissel/cleanup/remove-old-unused-files
Remove some older unused things
2025-10-02 13:33:29 -07:00
Jordan Sissel 93eaefd383 Remove some older unused things 2025-10-02 13:29:24 -07:00
Jordan Sissel 4cf32c5bc7 Update version in docs 2025-10-02 12:41:05 -07:00
Jordan Sissel 6115fe4c44
Merge pull request #2108 from jordansissel/issue/fix-readthedocs
Make readthedocs.org build the docs once again.
2025-10-02 12:30:06 -07:00
Jordan Sissel 781108fbf6 Update sphinx's project version to match fpm's just in case it's still used anywhere 2025-10-02 12:27:25 -07:00
Jordan Sissel 9c78876415 Fix?
> ModuleNotFoundError: No module named 'sphinx_rtd_theme'
2025-10-02 12:22:15 -07:00
Jordan Sissel a066c4447d Try to fix another error
>     sphinx.errors.ThemeError: no theme named 'sphinx_rtd_theme' found (missing theme.toml?)
2025-10-02 12:20:32 -07:00
Jordan Sissel e42a069c4f Update copyright text 2025-10-02 12:12:55 -07:00
Jordan Sissel 829b897456 A new error -
> ImportError: cannot import name 'Meta' from 'docutils.parsers.rst.directives.misc' (

This commit tries to resolve this by removing the 'docutils<0.18'
requirements entry.
2025-10-02 12:11:03 -07:00
Jordan Sissel 08e663916d Another missing required setting that wasn't required previously..
> Missing Sphinx configuration key The sphinx.configuration key is missing.

Reference: https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/
2025-10-02 12:07:51 -07:00
Jordan Sissel e15d2c3a1f `build.tools` setting is also required. 2025-10-02 12:05:27 -07:00
Jordan Sissel 249d3b997f Try to fix readthedocs build error
> Config file validation error Config validation error in build.os. Value build not found.
2025-10-02 12:01:04 -07:00
Jordan Sissel bdbe351796
Merge pull request #2107 from jordansissel/release-prep/1.17.0
Release prep for v1.17.0
2025-10-02 11:56:31 -07:00
Jordan Sissel 45f78973e7 Set pre-release version 2025-10-02 11:56:05 -07:00
Jordan Sissel db535710f7 Fix link syntax 2025-10-02 11:53:58 -07:00
Jordan Sissel 6bf2885139 Generate docs 2025-10-02 11:49:16 -07:00
Jordan Sissel 644e538311 Add docs building to release-prep 2025-10-02 11:48:59 -07:00
Jordan Sissel 9c415246f2 Fix reST syntax 2025-10-02 11:48:37 -07:00
Jordan Sissel e8cd0920d7 s/podman/docker/ 2025-10-02 11:43:22 -07:00
Jordan Sissel 22d44e1c49 Use debian/apt packages for python deps instead of pip... mainly because Debian's pip3 errors when you try to use it warning to use venv instead... 2025-10-02 11:43:04 -07:00
Jordan Sissel ef63628054 Fix Sphinx warning that language needs to be set to something 2025-10-02 11:42:22 -07:00
Jordan Sissel e0c3a1fc1a Only show the general options in the 'general options' docs entry. Before this, *all* flags were included and that was not intentional. 2025-10-02 11:38:19 -07:00
Jordan Sissel e1113c24e0 Release prep - generate docs and bump version 2025-10-02 11:04:42 -07:00
Jordan Sissel 290fe0741c Reformat changelog entries slightly (no wrapping). Also found an identical PR for #2011 in #2054 and noted that w/ contributor details 2025-10-02 10:12:25 -07:00
Jordan Sissel b69b7e5787 More changelog updates 2025-10-02 10:02:20 -07:00
Jordan Sissel feecdfe87b WIP release changelog updates. 2025-10-02 10:02:20 -07:00
Jordan Sissel de7a214bf5 Work in progress - Prepare v1.17.0 release 2025-10-02 10:02:20 -07:00
Jordan Sissel c6069f5584 Replace ostruct with a custom class that acts almost the same.
This removes a warning in 3.4.0 and prepares for Ruby 3.5.0:
> warning: ostruct was loaded from the standard library, but will no longer
> be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.

This seems preferable to adding ostruct as a gem dependency especially
since older rubies may not support the gem version of ostruct.
2025-10-01 22:36:03 -07:00
Jordan Sissel 583f7e4ba0 If the action runs with debug logging, run fpm specs with debug logging enabled 2025-10-01 22:13:44 -07:00
Jordan Sissel aa55aaca93 Python pyproject.toml and requirements.txt improvements
* --python-obey-requirements-txt behavior and tests. I swear this was
  working previously but the tests failed.
* Now supports packaging local python project directories containing
  a pyproject.toml
2025-10-01 22:13:44 -07:00
Jordan Sissel 23e7e0f554 Remove unused code and comments (fpm uses python to process dependency env markers) 2025-10-01 22:13:44 -07:00
Alexandr Zarubkin dd58d6714e Copy config file to staging if it doesn't exist there.
Fix #1823.
2025-10-01 17:36:56 -07:00
Jordan Sissel c76917a4e1 Add support for some uncommon package downloads.
* amqplib 1.0.2 downloads a file ending in .tgz instead of expected .tar.gz
* dnspython 1.15.0 has METADATA which includes a description body, but
  the metadata version is 2.0, and python core-metadata docs indicate
  v2.1 added support for description body. In this case, if the metadata
  version is 2.0, fpm now accepts a description body.

Reference: python core-metadata:
> Changed in version 2.1: This field may be specified in the message body instead.

Original report and fixes for this by @bugfood in #2002.
2025-09-30 15:25:44 -07:00
Jordan Sissel 17bc375e0b Add line continuation to keep ruby-lsp from warning about useless void context. 2025-09-30 15:25:44 -07:00
Jordan Sissel 42808ab943 Fix failing virtualenv tests
I hope this works? It works on my machine... :\

virtualenv and virtualenv-tools seem to be lesser-used these days. I
wonder if it'll be more useful to move to a different tool like venv...
2025-09-30 15:25:44 -07:00
Jordan Sissel 8e54e5ca49 Update rspec in order to use satisfy(description, &block)
Older rspec didn't allow a description to be given to satisfy(), but
newer ones do. I think I forgot to include this rspec version update
in PR #2103
2025-09-30 15:25:44 -07:00
Jordan Sissel 8b24206e19 Fix typo 2025-09-30 15:25:44 -07:00
Jordan Sissel f0e5b8abc0 Use python to parse python requires syntax and evaluate markers.
Not supported yet:
* Custom environment for marker evaluation.
* "extras" markers

Restore function to `--python-obey-requirements-txt`. This flag will
only work on python inputs that are provided as a directory, not a
wheel/tar.gz/etc.

Tests pass including the obey requirements.txt ones.

* Fix bug 'else File.directory?` -> `elsif File.directory?...` lol oops.
* Use Dir.entries instead of Dir.glob to allow python package extra
  syntax, with names like `django[bcrypt]` (Note, extras in requirements
  aren't evaluated yet)
2025-09-30 15:25:44 -07:00
Jordan Sissel b328c15ff6 Fix typo 2025-09-30 15:25:44 -07:00
Jordan Sissel 010093698a Work continues to center python package work around `pip` and away from setup.py
Working: Most python tests except for the --obey-requirements-text one
Breaking: Broke support for requirements.txt, for now.

* Deprecate --python-install-{bin,data,lib} flags since those are only
  supported by setup.py. `pip` just supports `--prefix` and maybe that's ok.
* Deprecate --python-scripts-executable for similar reasons. I don't
  think pip supports this?
* Add notes about unsupported Python dependency markers
* PythonMetadata is now a class with accessors providing name, version,
  requirements, homepage, maintainer, etc.
* Moved package url/homepage selection into PythonMetadata
* Fix bug where dependency list would have trailing spaces.
* Updated test suite with new python package name prefix selection
  (detecting python3, etc)
2025-09-30 15:25:44 -07:00
Jordan Sissel 002b42e98e Add accessors for parts of python metadata that we can use with fpm.
(Note: Not all parts of the metadata are used, and some could be used
that are not yet used...)

* Add more tests for parsing and PythonMetadata members
* maintainer: Use Maintainer-email if present, otherwise use Author-email
* license: Try the best field for using as the license label
  (License-Expression, License, or a Classifier entry)
* homepage: Try to pick the right value for the homepage, or close
  enough, since python packages can have multiple urls as project urls.
2025-09-30 15:25:44 -07:00
Jordan Sissel bc75218f37 Improvements to python wheel processing
Parsing Python METADATA files:
* Treat any 'multiple use' fields (as documented in the python
  core-metadata spec) as arrays at all times.
* If METADATA has a body, use it as the description (per spec)
* If Description comes from a header, then strip leading space-pipe text
  as per spec.
* Allow the last header (field: value) to end without a newline.
  (Using \Z regex)
  This allows the parser to process both METADATA and WHEEL files.
* Only use Project-URL as package url if one is given in METADATA
* Set package maintainer based on Maintainer-Email field

Python Environment:
* Move default python detection to a separate method

Also:
* Fix typo in `pip wheel` invocation with wrong variable name
* Remove 'json' require since it's no longer used.
2025-09-30 15:25:44 -07:00
Jordan Sissel fcee26e979 WIP to update python support to rely more on `pip`
Breaking:
* Removed calls to `setup.py` since this seems deprecated/unusable in
  almost any modern python package. [2]
* No longer work: `--python-install-data`, `--python-install-lib`, and
  `--python-install-bin`. The reason: `pip install ...` doesn't seem to
  support such flags, so there's no way to use these flags. Instead,
  you must set `--prefix` if you want to choose where the package
  installs if not the default location

New Behavior:
* When --python-bin isn't given to fpm, automatically try to find a
  correct python executable name[1]
* When --python-package-name-prefix isn't given, set a default based on
  the default --python-bin. That is, if python3 is being used, packages
  should default to a name prefix of "python3-"
* Package 'architecture' now will be "all" or "native" depending on the
  wheel file's `Root-Is-Purelib` field. It's unclear if this is the correct
  way to determine this, though.

Implementation Details:
* Parse package metadata from the wheel (METADATA and WHEEL files)
* Download pypi packages as wheels when available. Previously, fpm would
  specify `--no-binary :all:`, but no longer does.
* When source packages are only available, build a wheel locally.

Not yet tested:
* Not yet tested: Package a python module that exists in a local directory

[1] Python is sometimes available as python3, etc.
[2] https://packaging.python.org/en/latest/discussions/setup-py-deprecated/
2025-09-30 15:25:44 -07:00
Jordan Sissel 9a77831902 Move command running to verbose/info log instead of debug. 2025-09-30 15:25:44 -07:00
Jordan Sissel 873bff3820 Update cabin to fix Ruby ostruct deprecation/stdlib warning 2025-09-30 15:25:44 -07:00
Jordan Sissel 1c3cfe741e Change log message to note hardlink 2025-09-26 20:15:54 -07:00
Jordan Sissel 6025469d52 Only hardlink if the source file appears to be a hardlink and we have already copied one of it into the destination. This should fix #2102 2025-09-26 20:15:54 -07:00
Jordan Sissel fdfc384e71 Rely on copy_entry's logic to handle copying vs hardlinking. 2025-09-26 20:15:54 -07:00
Jordan Sissel 82ddba7a8c remove 'ostruct' require. ostruct's being moved out of ruby core, so this will help remove deprecation/move warnings 2025-09-26 20:15:54 -07:00