2011-10-24 20:00:59 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pyqwt < Formula
|
|
|
|
homepage 'http://pyqwt.sourceforge.net'
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/pyqwt/pyqwt5/PyQwt-5.2.0/PyQwt-5.2.0.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '797f37c63dec660272f6a8ccfd16a017df0ad640'
|
2011-10-24 20:00:59 +00:00
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
depends_on :python => :recommended
|
2011-10-24 20:00:59 +00:00
|
|
|
depends_on 'qt'
|
|
|
|
depends_on 'qwt'
|
|
|
|
depends_on 'sip'
|
|
|
|
depends_on 'pyqt'
|
|
|
|
|
|
|
|
def patches
|
|
|
|
# Patch to build system to allow for specific
|
|
|
|
# installation directories.
|
2013-01-21 09:33:56 +00:00
|
|
|
{ :p0 => DATA }
|
2011-10-24 20:00:59 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
cd "configure" do
|
2013-01-21 09:33:56 +00:00
|
|
|
python do
|
|
|
|
system python,
|
|
|
|
"configure.py",
|
|
|
|
"--module-install-path=#{lib}/#{python.xy}/site-packages/PyQt4/Qwt5",
|
|
|
|
"--sip-install-path=#{share}/sip#{python.if3then3}/Qwt5",
|
|
|
|
"--uic-install-path=#{lib}/#{python.xy}/site-packages/PyQt4",
|
|
|
|
"-Q", "../qwt-5.2"
|
|
|
|
system "make install"
|
|
|
|
system 'make clean'
|
|
|
|
end
|
2011-10-24 20:00:59 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-01-21 09:33:56 +00:00
|
|
|
def caveats
|
|
|
|
python.standard_caveats if python
|
2012-04-15 00:36:05 +00:00
|
|
|
end
|
|
|
|
|
2011-10-24 20:00:59 +00:00
|
|
|
def test
|
2013-01-21 09:33:56 +00:00
|
|
|
python do
|
|
|
|
system python, "-c", "from PyQt4 import Qwt5 as Qwt"
|
|
|
|
end
|
2011-10-24 20:00:59 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
--- configure/configure.py 2011-10-24 19:14:41.000000000 -0500
|
|
|
|
+++ configure/configure.py 2011-10-24 19:15:03.000000000 -0500
|
|
|
|
@@ -846,14 +846,14 @@
|
|
|
|
pattern = os.path.join(os.pardir, 'sip', options.qwt, 'common', '*.sip')
|
|
|
|
sip_files += [os.path.join(os.pardir, f) for f in glob.glob(pattern)]
|
|
|
|
installs.append(
|
|
|
|
- [sip_files, os.path.join(configuration.pyqt_sip_dir, 'Qwt5')])
|
|
|
|
+ [sip_files, os.path.join(options.sip_install_path, 'Qwt5')])
|
|
|
|
|
|
|
|
# designer
|
|
|
|
if configuration.qt_version > 0x03ffff:
|
|
|
|
plugin_source_path = os.path.join(
|
|
|
|
os.pardir, 'qt4lib', 'PyQt4', 'uic', 'widget-plugins')
|
|
|
|
plugin_install_path = os.path.join(
|
|
|
|
- configuration.pyqt_mod_dir, 'uic', 'widget-plugins')
|
|
|
|
+ options.uic_install_path, 'uic', 'widget-plugins')
|
|
|
|
compileall.compile_dir(plugin_source_path, ddir=plugin_install_path)
|
|
|
|
pattern = os.path.join(plugin_source_path, '*.py*')
|
|
|
|
plugin_files = [os.path.join(os.pardir, f) for f in glob.glob(pattern)]
|
|
|
|
@@ -1025,6 +1025,14 @@
|
|
|
|
'--module-install-path', default='', action='store',
|
|
|
|
help= 'specify the install directory for the Python modules'
|
|
|
|
)
|
|
|
|
+ install_options.add_option(
|
|
|
|
+ '--sip-install-path', default='', action='store',
|
|
|
|
+ help= 'specify the install directory for the sip files [share/sip]'
|
|
|
|
+ )
|
|
|
|
+ install_options.add_option(
|
|
|
|
+ '--uic-install-path', default='', action='store',
|
|
|
|
+ help= 'specify the install directory for the uic plugins [lib/python/PyQt4]'
|
|
|
|
+ )
|
|
|
|
parser.add_option_group(install_options)
|
|
|
|
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
@@ -1084,6 +1092,10 @@
|
|
|
|
if not options.module_install_path:
|
|
|
|
options.module_install_path = os.path.join(
|
|
|
|
configuration.pyqt_mod_dir, 'Qwt5')
|
|
|
|
+ if not options.sip_install_path:
|
|
|
|
+ options.sip_install_path = configuration.pyqt_sip_dir
|
|
|
|
+ if not options.uic_install_path:
|
|
|
|
+ options.uic_install_path = configuration.pyqt_mod_dir
|
|
|
|
|
|
|
|
print
|
|
|
|
print 'Extended command line options:'
|