aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements/python_dependency.rb
AgeCommit message (Collapse)Author
2015-03-05Remove unnecessary nil checkJack Nagel
The backticks will either return a string or raise an exception, so `executable` cannot be nil.
2015-03-05Use env DSLJack Nagel
2014-12-28Set cask and download DSL values on requirements.Mike McQuaid
Closes #35257. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-07-01Use predicate methods instead of inspecting the tags arrayJack Nagel
2014-04-04python_dependency: don't block pour when :build.Mike McQuaid
2014-04-03python_dependency: only pour with system python.Mike McQuaid
This is as Python bindings are not build in a way that can have system or Homebrew Python used interchangeably.
2014-03-18python_dependency: no brewed python for bottlesMike McQuaid
2014-03-14python_dependency: move bottle check into method.Mike McQuaid
2014-03-13python_dependency: always bottle with brew Python.Mike McQuaid
2014-03-12python_dependency: fixes, features, cleanup.Mike McQuaid
- PythonDependency now implies Python 2.7 - PythonDependency now uses brewed Python for bottling - Use double-quotes everywhere Closes #27112.
2014-02-10python_dependency: only set PYTHONPATH for system.Mike McQuaid
2014-01-29python_dependency: cleanup and fix build env.Mike McQuaid
* Only set PYTHONPATH for Python 2. * Set the Python binary for superenv. References #24842. Closes #26197. Closes #26216. Closes #26218. Closes #26228.
2014-01-20python_dependency: cleanup, fix satisfy.Mike McQuaid
Closes #26067.
2014-01-20PythonDependency: massive refactoring.Mike McQuaid
Closes #24842.
2013-12-14Update docs, comment mxcl/homebrew refs.Mike McQuaid
2013-11-25safer check for sys.executable in sitecustomize.pyMinRK
make sure it doesn't actually point to something else since sitecustomize.py is put in a location found by pypy, it breaks pypy by setting sys.executable to a path that is definitely wrong, and may not even exist. Closes #24581. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-11-18Python might not be up-to-date, so use opt_prefixJack Nagel
Fixes #24456.
2013-11-13grammar editsAdam Vandenberg
2013-11-01python_dependency: fix includes location on 10.9.Mike McQuaid
Fixes #23837. Fixes #23866.
2013-10-15Avoid the need to defensively flatten tags arrayJack Nagel
2013-09-14Rename PythonInstalled to PythonDependency.Mike McQuaid
Make it more consistent with other requirements.
2013-09-03PythonInstalled: Allow formulae to set/append PYTHONPATHSamuel John
Improve robustness of `PYTHONPATH` by first unsetting it (during `satisfy`) so that the `PythonInstalled` can get the `python.version` and so forth and then, after that, setting the `PYTHONPATH` to our `global_site_packages`. In the `python_helper` we append to the `PYTHONPATH` so if that var has been set in a formula, it is respected. Brew audit does no longer complain about setting the `ENV['PYTHONPATH']`.
2013-09-03PythonInstalled: Adding a private_site_packagesSamuel John
that live in the `libexec` dir of a `Cellar`.
2013-08-27PythonInstalled, name includes modulesSamuel John
If `depends_on :python => ['modulename', :optional]` then the generated option is now `--with-python-modulename`, so that it is possible to actually make depending on python modules optional. Further, `brew options` becomes more meaningful.
2013-08-23PythonInstalled: Unset PYTHONPATH for `satisfied?`Samuel John
When a formula `depends_on :python` *and* `depends_on :python3` the `modify_build_environment` method sets the PYTHONPATH and the Python 3.x requirement then fails because it finds the sitecustomize.py from Python 2.x in the PYTHONPATH.
2013-08-19Use ENV.prepend_pathJack Nagel
2013-08-19Use ENV.append_pathJack Nagel
2013-08-19which in requirements always uses ORIGINAL_PATHS nowJack Nagel
Fixes #22002.
2013-08-19Use File::PATH_SEPARATOR globally instead of ':'Amos Wenger
On Unix, the path separator is ':', whereas on Windows, it is ';'. This is the first of a series of patch to bring macbrew's and winbrew's codebases closer together. The main places the magic constant ':' was being used were: - the $PATH environment variable - CMAKE-related environment variables - pkg-config related environment variables Closes #21921. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-15Unlinked brewed python -> use system pythonSamuel John
Up to now a brewed Python, even if not linked, was preferred over and external Python, so that you had to completely `brew rm python` to have a formula link against external (mostly system) Python. From now on it is okay to `brew unlink python`.
2013-08-14Iterate over these directly rather than mapping firstJack Nagel
2013-08-14Return value of modify_build_environment is unimportantJack Nagel
2013-08-14Reverse conditionalJack Nagel
2013-08-14Collapse to one-linerJack Nagel
2013-08-14No need to map, all? takes a blockJack Nagel
2013-08-14Add missing falseJack Nagel
2013-08-14Remove stray spaceJack Nagel
2013-08-10Allow specifying a custom PATH for which methodJack Nagel
Closes #21794.
2013-08-08Python: Exit if PYTHONPATH is wrongSamuel John
In our sitecustomize.py we instruct python to exit with an error message if the PYTHONPATH is pointing to a wrong homebrew site-packages dir. With wrong meaning another major python version. If you set the PYTHONPATH to include $(brew --prefix)/lib/python2.7/site-packages and start python3, it may pick up modules from there, wich can result in errors for non pure python modules (such as PyQt).
2013-08-08For brewed python, make sure to unset the PYTHONPATHSamuel John
during building of python software inside of a `python do … end` block.
2013-08-03Remove ARCHFLAGS fixme from Python dependencyAdam Vandenberg
This will be handled by env/superenv, not Python.
2013-07-22Silence warningsJack Nagel
2013-07-22Fix python dependency hash equalityJack Nagel
eql? should not depend on the hash value as hash values of uneql objects can collide, but eql values may only collide for objects that are actually eql. Further, python dependencies are uniquely identified by the combination of the name and imports attributes, so there is no reason to involved the expensive binary computation for simple equality checks. Fixes #20840.
2013-07-22Remove redundant reader methodJack Nagel
2013-07-17Typo in commentsSamuel John
2013-07-16Allow specifying version in depends_on :pythonSamuel John
Note, in the explict form: PythonInstalled.new('2.7') => :recommended the tag :recommended is ignored (not a limitation of PythonInstalled itself). One solution was to write PythonInstalled.new('2.7', [:recommended]) but that is not as beautiful as we like it. Therefore, now it is possible to: depends_on :python => ['2.7', :recommended] Only the first tag is attempted to be parsed as a version specifyer "x" or "x.y" or "x.y.z"...
2013-06-27Use old #eql? for python reqs, for nowJack Nagel
2013-06-19depends_on :python => 'module' allow user packagesSamuel John
Some prefer to install with `--user` into their home. For example to avoid `sudo` with system's python. Now Homebrew can use those modules to satisfy a python dependency on a certain module.
2013-06-18Python module deps, ext. python fix and 10.6 fixSamuel John
* Fixes #20572 by tweaking the logic that decides which python is used by the `python` object inside a formula. There was a bug when on 10.6 there is no Python 2.7 but a :recommended Python was still treated as being available. * Use the user's PATH when looking for an external Python. Until now only brewed or OS X system's python have been found by `depends_on :python`. But now we support any Python in PATH (e.g. pyenv's python). * Further, instead of handling python modules and import tests in LanguageModuleDependency, these are now handled by: depends_on :python => 'numpy' # for example The old style depends_on 'numpy' => :python is still supported and is only an alias for the newer style (only for :python, the other languages are not altered by this commit). The reasoning is that if a formula requires a python module, it basically also needs python itself - and further that specific version of python has to provide the module. So the `PythonInstalled` is the natural place to check for the availability of a python module. Using a python module and other tags like :optional or :recommended is done like so: depends_on :python => [:optional, 'numpy'] Specifying another PyPi (Python Package index) name than the module import name is seldom used but supported, too: depends_on :python => ['enchant'=>'pyenchant'] A last note: For clarity, you can define multiple depends_on statements with different modules to be importable.`
2013-06-14Remove Version#to_a aliasJack Nagel
Exposing this as "to_a" was a mistake, versions are not arrays and it causes incorrect behavior when splatted or using Kernel#Array(). Use the more correct name "tokens" instead.