Skip to content

buildPythonPackage refactoring#1467

Merged
domenkozar merged 16 commits intoNixOS:masterfrom
domenkozar:buildPythonPackage-refactor
Feb 21, 2014
Merged

buildPythonPackage refactoring#1467
domenkozar merged 16 commits intoNixOS:masterfrom
domenkozar:buildPythonPackage-refactor

Conversation

@domenkozar
Copy link
Member

Hey folks. I've tried to split commits into separate standalone commits, but this is quite a change and it's far from perfect.

For a summary of changes see commit Refactor buildPythonPackage to modularize building process.

I'm also willing to write documentation for buildPythonPackage function and other stuff that I have found out now that I've worked on it for last 3 days, once we agree that this is a step forward.

There is still quite a TODO left for me to improve python infra:

  • docs, docs, docs
  • packages that don't use distutils/setuptools should have low-level functions available to support python integration (for example pygtk)
  • add fetchpypiurl that figures out the url by package name/version
  • fix pypy packages
  • buildPythonPackage should have an attribute what python versions the package supports (quite tricky and also we shouldn't forget pypy)
  • research/document python development with nix-shell (maybe add a developPhase)

cc @chaoflow @garbas @cillianderoiste @offlinehacker @edolstra @aszlig

@domenkozar
Copy link
Member Author

I fixed all issues that I could address. I still want to update manual documention with this PR, but the rest is finished. Any further comments?

Before we used `easy_install` command to handle installation
in one shot, now this is split into two phases:

 - buildPhase: python setup.py build
 - installPhase: python setup.py install

Each of those commands have the ability to pass extra
parameters through buildPythonPackage parameters as
`setupPyInstallFlags` and `setupPyBuildFlags`.

Phases now correctly execute post/pre hooks.

In configurePhase we inject setuptools dependency before distutils
is imported to apply monkeypatching by setuptools that is needed
for special features to apply.

We don't have to reorder default phases anymore, as test
phase comes after build and that works.

I rewrote offineDistutils into distutils-cfg with a bit cleaner
syntax and ability to specify extraCfg to the config file.

Plone packages are failing and garbas said he will adopt them to
the new functions. The rest of the packages I fixed and these commits
shouldn't break any package (according to my testings) and they introduce
16 new jobs and fix 38 that were broken before.
…d and add more docs.

For explanation see inline comments.
@domenkozar
Copy link
Member Author

I'm going to merge this one today, once I'm sure no packages fail to build.

domenkozar added a commit that referenced this pull request Feb 21, 2014
@domenkozar domenkozar merged commit 368839c into NixOS:master Feb 21, 2014
@domenkozar domenkozar deleted the buildPythonPackage-refactor branch February 21, 2014 17:33
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.

2 participants