Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pip without the --build flag #1896

Merged
merged 2 commits into from
May 2, 2022
Merged

Run pip without the --build flag #1896

merged 2 commits into from
May 2, 2022

Conversation

jordansissel
Copy link
Owner

Previously, fpm would use pip download ... --build ... to instruct pip
to unpack a given python package to a specific directory for the purpose
of running something like python setup.py from it.

However, somewhere in 2021, pip removed this flag. First, I think, it
was deprecated and ignored, then finally removed. One reference to
this removal in the upstream pip project is this issue:
pypa/pip#8333

Without --build, pip will place a single tarball in the destination
directory. Fpm cannot easily predict the name of this file because we
don't know the "real" name of the python package nor do we know the
version number being downloaded.

For example:

% python3 -m pip download --no-binary :all: --no-deps --no-clean django
...
Successfully downloaded django
% ls
Django-4.0.4.tar.gz

Best guess:

  • we can expect exactly one file in the previously-empty target directory
  • we can also expect that it is a .tar.gz

I don't know if these guesses are always correct, but it's a start.

As of this commit, the following command generates a Debian package:

fpm -s python --python-bin python3 -t deb django

Prior to this commit, with a newer version of pip, the command would
fail.

Fixes #1831

Previously, fpm would use `pip download ... --build ...` to instruct pip
to unpack a given python package to a specific directory for the purpose
of running something like `python setup.py` from it.

However, somewhere in 2021, pip removed this flag. First, I think, it
was deprecated and ignored, then finally removed. One reference to
this removal in the upstream pip project is this issue:
pypa/pip#8333

Without `--build`, pip will place a single tarball in the destination
directory. Fpm cannot easily predict the name of this file because we
don't know the "real" name of the python package nor do we know the
version number being downloaded.

For example:

```
% python3 -m pip download --no-binary :all: --no-deps --no-clean django
...
Successfully downloaded django
% ls
Django-4.0.4.tar.gz
```

Best guess:
* we can expect exactly one file in the previously-empty target directory
* we can also expect that it is a .tar.gz

I don't know if these guesses are always correct, but it's a start.

As of this commit, the following command generates a Debian package:

`fpm -s python --python-bin python3 -t deb django`

Prior to this commit, with a newer version of pip, the command would
fail.

Fixes #1831
Looks like at some point django changed the admin tool from
"django-admin" to "django-admin.py"

Possibly this changed in upstream in Django on this commit, though I
don't know for certain:
django/django@85efc14
@jordansissel
Copy link
Owner Author

Test results:

% bundle exec rspec spec/fpm/package/python_spec.rb                              
.............

Finished in 22.83 seconds (files took 0.1969 seconds to load)
13 examples, 0 failures

Tested on ruby 3.0.2, python3 3.10.4.

@jordansissel jordansissel merged commit 5d2b485 into master May 2, 2022
@de-bug
Copy link

de-bug commented Jun 3, 2022

Yes, works for me, thank you @jordansissel

@emansom
Copy link

emansom commented Aug 10, 2022

Fails here on Arch using the AUR package (with this pull request applied as patch atop). Not sure why. 🤷🏻‍♂️

$ fpm -s python -t rpm tcconfig
/usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse': 859: unexpected token at '' (JSON::ParserError)
        from /usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package/python.rb:255:in `load_package_info'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package/python.rb:111:in `input'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:352:in `block in execute'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:351:in `each'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:351:in `execute'
        from /usr/lib/ruby/gems/3.0.0/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:574:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/clamp-1.2.1/lib/clamp/command.rb:132:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/bin/fpm:7:in `<top (required)>'
        from /usr/bin/fpm:25:in `load'
        from /usr/bin/fpm:25:in `<main>'

With --debug:

$ fpm --debug -s python --python-bin python3 -t rpm tcconfig
Setting workdir {:workdir=>"/tmp", :level=>:info, :file=>"fpm/command.rb", :line=>"294", :method=>"execute"}
Setting attribute {:output_type=>"rpm", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:input_type=>"python", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:chdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:package=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:force?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:name=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:log_level=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:verbose?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:debug?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:debug_workspace?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:version=>1.0, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:iteration=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:epoch=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:license=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:vendor=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:category=>"none", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:dependencies=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:no_depends?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:no_auto_depends?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:provides=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:conflicts=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:replaces=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:config_files=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:directories=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:architecture=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:maintainer=>"<ewout@x11sslf>", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:package_name_suffix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:edit?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:excludes=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:exclude_file=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:description=>"no description", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:url=>"http://example.com/no-uri-given", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:inputs=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:post_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pre_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:post_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pre_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_remove=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_remove=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:after_upgrade=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:before_upgrade=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:template_scripts?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:template_value_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:workdir=>"/tmp", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:source_date_epoch_from_changelog?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:source_date_epoch_default=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_bin_path=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_package_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_package_name_prefix=>"rubygem", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_gem=>"gem", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_shebang=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_fix_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_env_shebang?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_prerelease?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_disable_dependencies=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_embed_dependencies?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_version_bins?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_stagingdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_git_repo=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:gem_git_branch=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_ignore_iteration_in_dependencies?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_build_depends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_pre_depends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_compression=>"gz", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_dist=>"unstable", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_custom_control=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_config=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_templates=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_installed_size=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_priority=>"extra", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_generate_changes?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_upstream_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_recommends=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_suggests=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_meta_file=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_interest=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_activate=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_interest_noawait=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_activate_noawait=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_field=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_no_default_config_files?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_auto_config_files?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_shlibs=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_init_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_default_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_upstart_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_enable?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_auto_start?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_systemd_restart_after_upgrade?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_after_purge=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:deb_maintainerscripts_force_errorchecks?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_bin=>"npm", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_package_name_prefix=>"node", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:npm_registry=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_user=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_group=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_defattrfile=>"-", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_defattrdir=>"-", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_rpmbuild_define=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_dist=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_digest=>"md5", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_compression_level=>"9", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_compression=>"gzip", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_os=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_changelog=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_summary=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_sign?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_auto_add_directories?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:auto_add_exclude_directories=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoreqprov?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoreq?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_autoprov?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:attrs=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_init_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_filter_from_provides=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_filter_from_requires=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_tag=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_ignore_iteration_in_dependencies?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_verbatim_gem_dependencies?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_macro_expansion?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_verifyscript=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_pretrans=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_posttrans=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_before_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_after_install=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_before_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:rpm_trigger_after_target_uninstall=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_perl_bin=>"perl", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_cpanm_bin=>"cpanm", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_mirror=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_mirror_only?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_package_name_prefix=>"perl", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_test?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_verbose?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_perl_lib_path=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_sandbox_non_core?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:cpan_cpanm_force?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_package_name_prefix=>"php-pear", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_channel=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_channel_update?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_bin_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_php_bin=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_php_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pear_data_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_bin=>"python3", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_easyinstall=>"easy_install", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_pip=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_pypi=>"https://pypi.python.org/simple", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_trusted_host=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_package_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_package_name_prefix=>"python", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_fix_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_downcase_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_downcase_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_bin=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_lib=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_install_data=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_dependencies?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_obey_requirements_txt?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_scripts_executable=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_disable_dependency=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_setup_py_arguments=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:python_internal_pip?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_identifier_prefix=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_payload_free?=>false, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_ownership=>"recommended", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_postinstall_action=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:osxpkg_dont_obsolete=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:solaris_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:solaris_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_zonetype=>"value=global value=nonglobal", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_publisher=>"FPM", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_lint?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:p5p_validate?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:freebsd_origin=>"fpm/<name>", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_yaml=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_confinement=>"devmode", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:snap_grade=>"devel", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_optional_depends_list=>[], :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_use_file_permissions?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_user=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_group=>"root", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pacman_compression=>"zstd", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pleaserun_name=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:pleaserun_chdir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_pypi=>"https://pypi.python.org/simple", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_package_name_prefix=>"virtualenv", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_install_location=>"/usr/share/python", :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_fix_name?=>true, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_other_files_dir=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_pypi_extra_index_urls=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_setup_install?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_system_site_packages?=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Setting attribute {:virtualenv_find_links_urls=>nil, :level=>:debug, :file=>"fpm/command.rb", :line=>"338", :method=>"block (2 levels) in execute"}
Trying to download {:package=>"tcconfig", :level=>:info, :file=>"fpm/package/python.rb", :line=>"126", :method=>"download_if_necessary"}
using pip {:pip=>["python3", "-m", "pip"], :level=>:debug, :file=>"fpm/package/python.rb", :line=>"144", :method=>"download_if_necessary"}
Running command {:args=>["python3", "-m", "pip", "download", "--no-clean", "--no-deps", "--no-binary", ":all:", "-d", "/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df", "-i", "https://pypi.python.org/simple", "tcconfig"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>319431, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
Looking in indexes: https://pypi.python.org/simple {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
Collecting tcconfig {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Using cached tcconfig-0.27.1.tar.gz (56 kB) {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Installing build dependencies: started {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Installing build dependencies: finished with status 'done' {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Getting requirements to build wheel: started {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Getting requirements to build wheel: finished with status 'done' {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Preparing metadata (pyproject.toml): started {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
  Preparing metadata (pyproject.toml): finished with status 'done' {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
Saved /tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df/tcconfig-0.27.1.tar.gz {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
Successfully downloaded tcconfig {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
Running command {:args=>["tar", "-zxf", "/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df/tcconfig-0.27.1.tar.gz", "-C", "/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df/tcconfig"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>319546, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
Running command {:args=>["/usr/bin/zsh", "-c", "python3 -c 'try:\n  import json\nexcept ImportError:\n  import simplejson as json'"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>319549, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
Running command {:args=>["/usr/bin/zsh", "-c", "python3 -c 'import pkg_resources'"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>319551, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
fetching package metadata {:setup_cmd=>"env PYTHONPATH=/usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package:$PYTHONPATH python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df/metadata.json", :level=>:info, :file=>"fpm/package/python.rb", :line=>"243", :method=>"block in load_package_info"}
Running command {:args=>["/usr/bin/zsh", "-c", "env PYTHONPATH=/usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package:$PYTHONPATH python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df/metadata.json"], :level=>:debug, :file=>"fpm/util.rb", :line=>"138", :method=>"execmd"}
Process is running {:pid=>319554, :level=>:debug, :file=>"fpm/util.rb", :line=>"147", :method=>"execmd"}
running get_metadata {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"47", :method=>"block in pipe"}
result from `setup.py get_metadata` {:data=>"", :level=>:debug, :file=>"fpm/package/python.rb", :line=>"254", :method=>"load_package_info"}
Cleaning up staging path {:path=>"/tmp/package-python-staging-6100f6680307e12ef8a893bb4e61835b27544cb1b115c2f30f984dd35b8d", :level=>:debug, :file=>"fpm/package.rb", :line=>"284", :method=>"cleanup_staging"}
Cleaning up build path {:path=>"/tmp/package-python-build-08cba7d6c21a80d13fa281e369e365924c1c965204c655ffd57a1504c4df", :level=>:debug, :file=>"fpm/package.rb", :line=>"291", :method=>"cleanup_build"}
/usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse': 859: unexpected token at '' (JSON::ParserError)
        from /usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package/python.rb:255:in `load_package_info'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/package/python.rb:111:in `input'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:352:in `block in execute'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:351:in `each'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:351:in `execute'
        from /usr/lib/ruby/gems/3.0.0/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/lib/fpm/command.rb:574:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/clamp-1.2.1/lib/clamp/command.rb:132:in `run'
        from /usr/lib/ruby/gems/3.0.0/gems/fpm-1.14.0/bin/fpm:7:in `<top (required)>'
        from /usr/bin/fpm:25:in `load'
        from /usr/bin/fpm:25:in `<main>'

@jordansissel
Copy link
Owner Author

@emansom I think your problem might be different than the pip --build issue. Can you open a new issue if you're still having this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest pip versions doesn't support --build option
3 participants