aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/language/python.rb
AgeCommit message (Collapse)Author
2016-10-04Immortalize virtualenvs betterTim D. Smith
virtualenvs remember the prefix of the python that created them and do magic to load packages from them; help them remember a more durable path.
2016-10-02virtualenv_install_with_resources: select correct pythonilovezfs
`virtualenv_install_with_resources` will now attempt to guess the desired Python based on the active build options and based on the dependencies and requirements. When the situation is ambiguous (e.g., `depends_on :python3` and `build.with? "python"` is true) raise `FormulaAmbiguousPythonError` unless `:using => "python"` or `:using => "python3"` has been passed to resolve the ambiguity. In most cases, this will allow ``` virtualenv_create(libexec, "python3") virtualenv_install_with_resources ``` to be changed to just ``` virtualenv_install_with_resources ```
2016-09-10language/python: fix Rubocop warnings.Mike McQuaid
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2016-08-02python: tweak script linking in virtualenv (#613)Martin Afanasjew
* python: tweak script linking in virtualenv Instead of making the formula author use a slightly awkward block like venv.link_scripts(bin) { venv.pip_install buildpath } avoid exposing this implementation detail and offer the more familiar: venv.pip_install buildpath, :link_scripts => bin * Add non-block form and use instead of recursion * Update 'pip_install' documentation * Remove obsolete 'link_scripts' * Add test for 'pip_install' with linking scripts Also drop no longer relevant (and broken) `link_scripts` test, that served as a template for the new test. * Restore compatibility with Ruby 1.8.7 * Replace option hash with 'pip_install_and_link' * Avoid confusing 'Object#tap' and fix silly bug * Avoid side effects in mock object parameter check * Simplify argument check (no need for a block)
2016-07-31Allow virtualenvs to find Python bindings provided by deps (#608)Tim D. Smith
Allow virtualenvs to find Python bindings provided by deps Closes #603.
2016-07-29Refurbish args in virtualenv (#600)Tim D. Smith
Instead of adding additional lines to formula.rb: https://git.io/vKxxh just turn on argument refurbishment for any formula that creates a virtualenv. cf Homebrew/ruby-macho#50, Homebrew/homebrew-core#1663
2016-07-26Add helper class for Python virtualenvsTim D. Smith
2016-07-16Unify Version.create usageVlad Shablinsky
Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
2016-07-09language/python: fix bogus requireMartin Afanasjew
Including the extension is not an error, but we don't normally do this.
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-03language/python: add package_available? helperTim D. Smith
Add helper to check whether a module is importable. Closes Homebrew/homebrew#37345. Signed-off-by: Tim D. Smith <git@tim-smith.us>
2015-01-09language/python: add --no-user-cfg to setuptools optionsTim D. Smith
Closes Homebrew/homebrew#35681.
2014-12-10Language::Python.setup_install: add deprecation warningTim D. Smith
2014-12-10language/python: setup_install_argsTim D. Smith
Add a helper like std_cmake_args that returns the correct incantation for invoking setup.py in a consistent way and with our preferred arguments. Replaces setup_install.
2014-11-14language/python: make sure site_packages is writableTim D. Smith
2014-11-10language/python: new setup_install methodTim D. Smith
Closes Homebrew/homebrew#33988.
2014-11-02language/python: add helper methods for pth detectionTim D. Smith
2014-06-22Move deprecated Formula class methods to compatJack Nagel
These have all been moved to Formulary.
2014-03-12Add Language::Python module.Mike McQuaid