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

Add --python-setup-py-arguments flag #1120

wants to merge 1,844 commits into from


Copy link

cure commented May 26, 2016

This flag can be used to pass arbitrary arguments to

This is helpful to package python modules that have a poorly written that requires special arguments.

For example, this allows building ruamel.yaml which requires


to be given to


This comment has been minimized.

Copy link

lattwood commented on 2c00bac Jun 2, 2015

Any chance of a new gem with this?

Matt Schreiber and others added 8 commits Jun 4, 2015
* (21 commits)
  make sandboxing non-core modules optional
  Remove python_install_bin setting; this was causing the tests to fail on OSX
  Revert unintentional change
  Remove unnecessary requires lines from  spec
  Add empty as output target for testing purposes
  Add before-install script to sh package type
  Add  to pre- and post- removal scripts to make them safer
  fixed typo in command.rb
  fix exclude-file to exclude_file issue
  For Debian packages, register files in `/etc` as conf files
  List loaded package types on the help screen
  Fixed github link title in RAEDME
  First whack at translating deb scripts/conffiles into rpm
  Add tests for python dependency manipulation. Also switch spec/fixtures/python/ from distutils to setuptools.
  Add --python-disable-dependency option to disable specific python dependencies.
  Add command line flag for --exclude-file.
  Add commandline flag for --exclude-file to support a file listing exclude patterns.
  Add some basic specs for the SH package
  Add package metadata to slug file format
Fixing symbol name
Fixing symbol name
Prevents lintian control-file-has-bad-permissions
Ensure --deb-shlibs file permission to keep lintian happy
jordansissel and others added 25 commits May 11, 2016
workaround rubygems issue #1608 and remove dependency of corefines
Clarify that --replaces is the same as rpm "Obsoletes"
Fix fpm to work with recent versions of pip (with helpful comment)
Long term, we'll probably have a "smart" post-install that will choose
the correct service (systemd, etc) to install based on the platform
doing the installation, not the platform creating the package :)

Adds dependencies on pleaserun and upgrades clamp to suit.

Example using the defaults in pleaserun:

    # Create a package called 'example-service' that installs a service named 'example'
    % bin/fpm -s pleaserun -t rpm -n example-service --pleaserun-name example  =logger hello world
    No platform selected. Autodetecting... {:platform=>"systemd", :version=>"default", :level=>:warn}
    Writing file {:destination=>"/tmp/package-pleaserun-staging20160513-12576-1ozurnf/lib/systemd/system/example.service"}
    Writing install actions. You will want to run this script to properly activate your service on the target host {:path=>"/tmp/package-pleaserun-staging20160513-12576-1ozurnf/"}
    Created package {:path=>"example-service-1.0-1.x86_64.rpm"}

    # ^^ The above service will execute "logger hello world"

    # What's in our rpm?
    % rpm -qlp example-service-1.0-1.x86_64.rpm

    # What about any post-install steps?
    % rpm -qp example-service-1.0-1.x86_64.rpm --scripts
    postinstall scriptlet (using /bin/sh):
    systemctl --system daemon-reload

    # Install it.
    % sudo rpm -ivh example-service-1.0-1.x86_64.rpm

    # Start it.
    % sudo systemctl start example

    # Check the logs!
    % sudo tail -n1 /var/log/messages
    May 13 03:32:55 localhost root: hello world

Example choosing 'sysv' as the platform:

    % bin/fpm -s pleaserun -t rpm -n example-service --pleaserun-platform sysv --pleaserun-name example  =logger hello world
    Writing file
    Writing file
    Created package {:path=>"example-service-1.0-1.x86_64.rpm"}

    % rpm -qlp example-service-1.0-1.x86_64.rpm
… detected.

Also move files to be /platform/version/... instead of
* Only try install actions if they exist
* Add special case for Upstart 0.6.5 (CentOS 6)
The scripts will be written to the top-level `.scripts/` directory
The `` will generate a script that is executed when
the package is removed.
…. Without this, the default is 'no description given' which is not a helpful default
Closes #861
Drop duplicate .conf suffix
New source: pleaserun
arguments to

This is helpful to package python modules that have a poorly written that requires special arguments.
@jordansissel jordansissel force-pushed the jordansissel:master branch from 7b71484 to e0ec0f3 Jun 20, 2016

This comment has been minimized.

Copy link

jordansissel commented Jun 20, 2016

I just did some maintenance on the git history in the fpm repo. In doing so, I messed up this PR. You may have to rebase against master. Let me know if you need help doing this.


This comment has been minimized.

Copy link

josephholsten commented Jul 21, 2017

fixed with rebase in #1376. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
You can’t perform that action at this time.