New `depends_on :python` Dependency.
New `depends_on :python3` Dependency.
To avoid having multiple formulae with endings -py2 and -py3,
we will handle support for different pythons (2.x vs. 3.x)
in the same formula.
Further brewed vs. external python will be transparently supported.
The formula also gets a new object `python`, which is false if
no Python is available or the user has disabled it. Otherwise
it is defined and provides several support methods:
python.site_packages # the site-packages in the formula's Cellar
python.global_site_packages
python.binary # the full path to the python binary
python.prefix
python.version
python.version.major
python.version.minor
python.xy # => e.g. "python2.7"
python.incdir # includes of python
python.libdir # the python dylib library
python.pkg_config_path # used internally by brew
python.from_osx?
python.framework?
python.universal?
python.pypy?
python.standard_caveats # Text to set PYTHONPATH for python.from_osx?
python.if3then3 # => "" for 2.x and to "3" for 3.x.
Further, to avoid code duplication, `python` takes an optional
block that is run twice if the formula defines depends_on
:python AND :python3.
python do
system python, 'setup.py', "--prefix=#{prefix}"
end
Read more in the Homebrew wiki.
Without this change Mapnik's postgis.input plugin will end up linking to the
apple provided `/usr/lib/libpg.5.dylib`, which will cause all sorts of odd and
broken behavior at runtime.
ClosesHomebrew/homebrew#20003.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
- Mapnik searches for py2cairo -> added dep if --with-cairo
- Explicitly give includes and libs for icu, boost, proj,
jpeg, libtif, and cairo
- pkg-config is not only used for cairo -> moved it out
of the `if build.include? 'with-cairo'` block
ClosesHomebrew/homebrew#17032.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The patch has been merged upstream.
Add `unless ARGV.build_head?` to the patch block.
Note in the comments to remove the patch at version 2.0.2.
Mapnik HEAD builds well again.
FixesHomebrew/homebrew#12683
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Add patch to mapnik.rb to use an absolute path into site-packages
rather than a relative path in the file `paths.py`. The upstream
bug report is noted in the formula comments and is where the patch
offered by the developer came from.
FixesHomebrew/homebrew#12026.
ClosesHomebrew/homebrew#12043.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
mapnik compiles can take ~1.5 GB per job for some .cpp files
so lets be cautious by limiting to CPUS/2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Mapnik by default tries to install to the site-packages in /System
when brewed against system Python. This causes a build error
because that directory is not writeable. Mapnik correctly
determines the versioned site-packages name without modification,
but for Homebrew it needs the proper prefix.
* Add the standard `which_python` function to the formula.
* Add a scons argument for `PYTHON_PREFIX`
* Add the standard caveat for `PYTHONPATH`.
Discussed upstream: https://github.com/mapnik/mapnik/issues/1155
and tested on Lion against the system Python.
FixesHomebrew/homebrew#11389ClosesHomebrew/homebrew#11407.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- new download link for mapnik 2.0.0 - and tweaks to avoid needing
external scons and to properly set the CC/CXX/JOBS so that the mapnik
build scripts will pick them up
ClosesHomebrew/homebrew#8177.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>