Commit Graph

166 Commits

Author SHA1 Message Date
P. R. d. O
818b88aa9c
python38Packages.generic: init at 1.0.1 2021-10-31 18:19:26 -06:00
Frederik Rietdijk
b080748d42 Python: move python-modules/generic to interpreter folder 2016-09-01 16:16:31 +02:00
Shea Levy
8b9b9fad31 Revert "Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs""
Revert a revert of a merge that shouldn't have been in master but was intentionally in staging.

Next time I'll do this right after the revert instead of so far down the line...

This reverts commit 9adad8612b.
2016-08-24 07:35:30 -04:00
Nikolay Amiantov
13c04c837d wrapPython: fix replace of env invokations 2016-08-23 17:55:12 +03:00
Nikolay Amiantov
837cf416ce wrapPythonProgram: exclude Python itself from PYTHONPATH 2016-08-20 00:42:49 +03:00
Nikolay Amiantov
4ad459e3e0 wrapPythonProgram: split into several functions 2016-08-20 00:42:49 +03:00
Nikolay Amiantov
01624e1ac2 wrapPythonProgram: use site.addsitedir instead of PYTHONPATH 2016-08-20 00:42:49 +03:00
Shea Levy
9adad8612b Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs"
Was meant to go into staging, sorry

This reverts commit 57b2d1e9b0, reversing
changes made to 760b2b9048.
2016-08-15 19:05:52 -04:00
Bjørn Forsman
b6153c8f9c python: add file encoding spec to run_setup.py
Newer 'mutagen' versions have a test suite that trips over missing
encoding in this file. The file is copied to source trees at build time
with the name nix_run_setup.py.
2016-08-02 01:00:26 +02:00
Vladimír Čunát
e757404555 Merge branch 'master' into staging
Hydra nixpkgs: ?compare=1279790
2016-06-19 12:33:04 +02:00
Domen Kožar
3ea8068181 buildPythonPackage: be able to disable package conflict check 2016-06-16 11:49:19 +01:00
Frederik Rietdijk
9f2699fd30 Python: fix the wheel package 2016-06-16 11:36:10 +02:00
Vladimír Čunát
cec03a8ecd Merge #14753: makeWrapper: allow spaces in variables 2016-06-09 13:09:43 +02:00
Domen Kožar
b49bf121b8 rename iElectric to domenkozar to match GitHub 2016-05-17 13:00:47 +01:00
Vladimír Čunát
6c2fbfbd77 Merge branch 'master' into staging 2016-05-12 04:53:38 +02:00
Frederik Rietdijk
3beda443bc Python: re-enable default testing
In 303e976 default testing of setuptools packages was accidentally
disabled.
2016-05-09 18:33:43 +02:00
Frederik Rietdijk
303e976245 Python: allow installing wheels
By passing `format="wheel"` it is now possible to install a wheel.
It's not recommended, but it can be useful.
2016-05-09 13:17:42 +02:00
Nikolay Amiantov
97e4c19fca wrapPython: drop python suffixes 2016-04-22 20:57:15 +03:00
Marius Bakke
28919e5bfa wrapPythonPrograms: preserve quoted strings from makeWrapperArgs
Currently, if a user tries to to set a variable that contains
spaces, it will be broken up before being passed to wrapProgram.

This commit resolves that by converting makeWrapperArgs to an
array that preserves any quoted elements using bash's parser.
2016-04-16 02:58:02 +01:00
Nikolay Amiantov
895f51222e buildPythonPackage: add installFlags 2016-02-21 12:20:51 +01:00
Vladimír Čunát
e4ab8aee62 add ensureNewerSourcesHook and apply to all python
Fixes #12663: problems in python stuff due to old timestamps in sources.
- Files in sources older than a certain year are set to that year.
- Applied with 1980 for all python packages due to the way it often uses zip.
2016-02-03 10:21:16 +01:00
Domen Kožar
07049a7edf python generic builder: fix typos 2016-01-27 13:11:20 +01:00
Domen Kožar
7a3b518d62 buildPythonPackage: fix a regression #11303 2015-11-27 11:44:34 +01:00
Domen Kožar
0c772699ba buildPythonPackage: write some comments 2015-11-26 17:31:10 +01:00
Domen Kožar
cf5984e4bf buildPythonPackage: fix support for pypy 2015-11-23 17:47:35 +01:00
Rok Garbas
d82f55aead pythonPackages: shellHook of buildPythonPackages needs tmp_path to have lib/pythonX.Y/site-packages folder 2015-11-23 17:43:32 +01:00
Domen Kožar
90f97c125d buildPythonPackage: use pip for development also 2015-11-21 22:17:04 +01:00
Domen Kožar
c6c58dc92d release-python.nix: automatically detect buildPythonPackage 2015-11-21 21:44:12 +01:00
Domen Kožar
9bf99a5a4d buildPythonPackage: don't do build_ext if not needed 2015-11-21 21:44:12 +01:00
Domen Kožar
127a20f8da buildPythonPackage: sadly, checkPhase is too often installPhase in python 2015-11-21 21:44:12 +01:00
Domen Kožar
6ba529277a buildPythonPackage: catch_conflicts should ignore pip 2015-11-21 21:44:12 +01:00
Domen Kožar
1029db9024 buildPythonPackage: fix do_conflict.py on python 3 2015-11-21 21:44:12 +01:00
Domen Kožar
a912c45ee2 buildPythonPackage: get rid of setupPyInstallFlags since there is no such thing 2015-11-21 21:44:12 +01:00
Domen Kožar
42acb5dc55 buildPythonPackage: fix pypy 2015-11-21 21:44:12 +01:00
Domen Kožar
f900231042 buildPythonPackage: fail if two packages with the same name are in closure 2015-11-21 21:44:12 +01:00
Domen Kožar
f3092d6446 buildPythonPackage: use a separate file to fire off setup.py 2015-11-21 21:44:12 +01:00
Domen Kožar
960274fc7c wrapPython: use $out/bin also for $PATH (fixes pyramid pserve --reload) 2015-11-21 21:44:12 +01:00
Domen Kožar
a2a6f60b5a WIP: buildPythonPackages now uses wheels internally 2015-11-21 21:44:12 +01:00
Domen Kožar
b666ac3e9f Revert "python: skip build at install phase"
This reverts commit d34f5b6570.

PIL and NumPy don't like this change and I'd rather spend time on
bringing wheels to Nix than fixing old infrastructure.
2015-11-15 13:50:04 +01:00
Domen Kožar
5a16c0e6e4 buildPythonPackage: clean up shellHook 2015-11-15 13:50:04 +01:00
Domen Kožar
d34f5b6570 python: skip build at install phase
"python setup.py install" will also run "python setup.py build"
which we've already done in buildPhase.
2015-11-04 11:40:09 +01:00
Domen Kožar
0509252e28 python: don't pass disabled to derivation 2015-10-30 11:31:19 +01:00
Vladimír Čunát
8f33b8cc93 mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution.
Now we have no modes starting with `/` or `+`.

Rewrite the `-perm` parameters of find:
 - completely safe: rewrite `/0100` and `+100` to `-0100`,
 - slightly semantics-changing: rewrite `+111` to `-0100`.
I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
2015-09-06 10:26:30 +02:00
Vladimír Čunát
862900e42e mass-replace deprecated usage of find -perm (Fixes #9044)
sed 's|-perm +0|-perm /0|g'
It's a mass-rebuild due to usage in stdenv's default setup hooks.
2015-07-30 10:30:17 +02:00
aszlig
b028c14256
python-wrapper: Fix variable name for sed expr.
Regression introduced by 5f55788531.

The commit not only changes documentation, but also changed a few
variable names. One of them is $i which now is $f and it contains the
name of the file to wrap.

This was accidentally found by @Profpatsch (thanks!) who found himself
getting the basename of the last patch file to end up in sys.argv[0].
The reason for this is that $i is used in the for loop of the generic
patchPhase and thus is reused later when the Python file is to be
wrapped.

I have also added a small comment noting about this, to be sure that
this won't accidentally occur the next time someone changes variable
names.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-07-07 18:25:10 +02:00
Allen Nelson
6bb2e47abf using makeWrapperArgs instead of setEnvVars 2015-05-24 10:21:33 -05:00
Allen Nelson
bf1a16bbea removing superfluous lets 2015-05-24 10:21:33 -05:00
Allen Nelson
06ff4af597 Adding documentation to wrap.sh, added ability to retain any desired environment variables. 2015-05-24 10:21:33 -05:00
Allen Nelson
5f55788531 adding docs to python wrap.sh 2015-05-24 04:55:24 -05:00
aszlig
311aa5d8d9
python-wrapper: Handle strings at the beginning.
This should fix #7366 for now, but using the (IMHO) pragmatic approach
of extending the sed expression to recognize strings.

However, this approach is obviously not parsing the full AST, nor does
it wrap Python itself (as pointed out by @spwhitt in #7366) but tries to
match Python strings as best as possible without getting TOO unreadable.

We also use a little bit of Nix to help generating the SED expression,
because doing the whole quote matching block over and over again would
be quite repetitious and error-prone to change. The reason why I'm using
imap here is that we need to have unique labels to avoid jumping into
the wrong branch.

So the new expression is not only able to match continous regions of
triple-quoted strings, but also regions with only one quote character
(even with escaped inner quotes) and empty strings.

However, what it doesn't correctly recognize is something like this:

"string1" "string2" "multi
line
string"

Which is very unlikely that we'll find something like this in the wild.
Of course, we could handle it as well, but it would mean that we need to
substitute the current line into hold space until we're finished parsing
the strings, branch off to another label where we match multiline
strings of all sorts and swap hold/pattern space and finally print the
result. So to summarize: The SED expression would be 3 to 4 times bigger
than now and we gain very little from that.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-14 07:13:15 +02:00