Commit 0e60af2e authored by Jeremy Sanders's avatar Jeremy Sanders

New upstream version 3.0.1

parent 79501fdc
Changes in 3.0.1:
* Change in build system to use qmake to find Qt locations. This is to fix
the build inside Anaconda. Also Qt and sip parameters can now be given
as environment variables.
* Fix problem when picking points with too many non-finite values
* Change default SVG export DPI to 96 to match inkscape and provide
option in dialog to choose export DPI
* Allow %PAGE% and %PAGENAME% in export filename for single page output
* Fix failing fitting due to iminuit differences
* Fix crash if both ends of part of broken axis widget are the same for
EMF exporting
Changes in 3.0:
* New 3D support for plotting points, functions, surfaces and volumes
* Add --export-option parameter for command line exporting control
......
......@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "VEUSZ 1"
.TH VEUSZ 1 "2018-04-22" "3.0" "Veusz"
.TH VEUSZ 1 "2018-04-22" "3.0.1" "Veusz"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -90,4 +90,4 @@ COPYRIGHT
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
3.0 2018-04-22 VEUSZ(1)
3.0.1 2018-04-22 VEUSZ(1)
......@@ -189,7 +189,7 @@ Export
:command:`Export(filename, color=True, page=0, dpi=100,
antialias=True, quality=85, backcolor='#ffffff00', pdfdpi=150,
svgtextastext=False)`
svgdpi=96, svgtextastext=False)`
Export the page given to the filename given. The :command:`filename`
must end with the correct extension to get the right sort of output
......@@ -204,7 +204,8 @@ True. :command:`quality` is a quality parameter for jpeg
output. :command:`backcolor` is the background color for bitmap files,
which is a name or a #RRGGBBAA value (red, green, blue,
alpha). :command:`pdfdpi` is the dpi to use when exporting EPS or PDF
files. :command:`svgtextastext` says whether to export SVG text as
files. :command:`svgdpi` is the dpi to use when exporting to SVG files.
:command:`svgtextastext` says whether to export SVG text as
text, rather than curves.
FilterDatasets
......
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ee03a8ceaa41d8d3226de6536feef811
config: ee14a1d4fb737826e199e9a6fa6eb104
tags: 645f666f9bcd5a90fca523b33c5a78b7
......@@ -189,7 +189,7 @@ Export
:command:`Export(filename, color=True, page=0, dpi=100,
antialias=True, quality=85, backcolor='#ffffff00', pdfdpi=150,
svgtextastext=False)`
svgdpi=96, svgtextastext=False)`
Export the page given to the filename given. The :command:`filename`
must end with the correct extension to get the right sort of output
......@@ -204,7 +204,8 @@ True. :command:`quality` is a quality parameter for jpeg
output. :command:`backcolor` is the background color for bitmap files,
which is a name or a #RRGGBBAA value (red, green, blue,
alpha). :command:`pdfdpi` is the dpi to use when exporting EPS or PDF
files. :command:`svgtextastext` says whether to export SVG text as
files. :command:`svgdpi` is the dpi to use when exporting to SVG files.
:command:`svgtextastext` says whether to export SVG text as
text, rather than curves.
FilterDatasets
......
......@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......@@ -332,6 +332,11 @@ table.docutils {
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
......@@ -398,6 +403,13 @@ table.field-list td, table.field-list th {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
......@@ -438,10 +450,14 @@ dd {
margin-left: 30px;
}
dt:target, .highlighted {
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
......
......@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......@@ -45,7 +45,7 @@ jQuery.urlencode = encodeURIComponent;
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s == 'undefined')
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
......@@ -66,29 +66,53 @@ jQuery.getQueryParameters = function(s) {
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
var span = document.createElement("span");
span.className = className;
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var bbox = span.getBBox();
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
var parentOfText = node.parentNode.parentNode;
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this);
highlight(this, addItems);
});
}
}
return this.each(function() {
highlight(this);
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
......@@ -131,21 +155,21 @@ var Documentation = {
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return string;
return (typeof translated == 'string') ? translated : translated[0];
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated == 'undefined')
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
......@@ -180,7 +204,7 @@ var Documentation = {
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash)
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
......@@ -216,7 +240,7 @@ var Documentation = {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) == 'minus.png')
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
......@@ -248,7 +272,7 @@ var Documentation = {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this == '..')
if (this === '..')
parts.pop();
});
var url = parts.join('/');
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......@@ -540,6 +540,9 @@ var Search = {
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
if (suffix === undefined) {
suffix = '.txt';
}
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
dataType: "text",
complete: function(jqxhr, textstatus) {
......
......@@ -4,7 +4,7 @@
*
* sphinx.websupport utilities for all documentation.
*
* :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
......
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &#8212; Veusz 3.0 documentation</title>
<title>Index &#8212; Veusz 3.0.1 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '3.0',
VERSION: '3.0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
......@@ -33,7 +30,7 @@
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body role="document">
<body>
<div class="document">
......@@ -81,7 +78,7 @@
&copy;2003-2018, Jeremy Sanders.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.5.6</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
</div>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Veusz documentation &#8212; Veusz 3.0 documentation</title>
<title>Veusz documentation &#8212; Veusz 3.0.1 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '3.0',
VERSION: '3.0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
......@@ -33,7 +30,7 @@
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body role="document">
<body>
<div class="document">
......@@ -234,7 +231,7 @@ scientific plotting package with a graphical user interface.</p>
&copy;2003-2018, Jeremy Sanders.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.5.6</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
|
......
This diff is collapsed.
# Sphinx inventory version 2
# Project: Veusz
# Version: 3.0
# Version: 3.0.1
# The remainder of this file is compressed using zlib.
xڕ͎ Fy
KEH3R7u9V"pbpg<}/vU|gl 0>4ߩ' puLFI Mm`CӇ̈́31S<nMDyzc}36epe4Hт'r&2cy8HlNk9ŕJjJ6ef;c(,:G(Y{pMr=c9 =^F!'O{94$S!G42c}|% ?FjU RN.|ΏdHㄡnkjwe%3x- S"{DHիj/a|'x _MƄ'TΓWx=EߒR _d*\S+"au$3G\1zR;HIP]viF(4h+B7ZДY׈dڹb_L{ɔd~XtS1$nL%#w؁̮oΗ#z:k&zv7^qN/rnzLW^=t[٘]$x8H7O.C)3LA3: l"-WΜN9|Ci&_a^q*Дp12"y13}-߀v(pg,pxeO&aS2b<cЁj-&Z*gXP^/p5V O˿IJ76\Ο2}?bY>;؏eݾןqϰ \4 G=02
\ No newline at end of file
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &#8212; Veusz 3.0 documentation</title>
<title>Search &#8212; Veusz 3.0.1 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '3.0',
VERSION: '3.0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
......@@ -40,7 +37,7 @@
</head>
<body role="document">
<body>
<div class="document">
......@@ -91,7 +88,7 @@
&copy;2003-2018, Jeremy Sanders.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.5.6</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.7</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
</div>
......
This diff is collapsed.
......@@ -39,11 +39,11 @@ pyemf for Python 3 can be found at https://github.com/jeremysanders/pyemf.
There are a number of ways to install programs using distutils. I will
list a few of the possible method here:
To install on linux to the standard location on the hard disk follow
these instructions (note python in theres commands can be replaced by
python3 to do a python3 installation).
To install on Linux to the standard location on the hard disk follow
these instructions (note python in these commands should be replaced
by python3 to do a Python 3 installation).
# cd veusz-2.2.2
# cd veusz-3.0.1
# python setup.py build
# su
[enter root password]
......@@ -74,6 +74,11 @@ graphical environment to create a hidden X11 server:
# xvfb-run -a --server-args "-screen 0 640x480x24" \
python tests/runselftest.py
Alternatively, the Qt platform can be switched to minimal to avoid the
use of X11:
# QT_QPA_PLATFORM=minimal python tests/runselftest.py
1.1.2 Separate resources directory
==================================
By default, setup.py installs certain resource files (VERSION, icons,
......@@ -98,6 +103,7 @@ resources directory to point to the location of the example files.
1.1.3 SIP parameters
====================
By default the location of the SIP executable, the SIP include file
location and the SIP files are obtained from sipconfig. sipconfig is
now deprecated. If sipconfig is not found, the build will look for the
......@@ -111,6 +117,29 @@ stage before build, with the parameters:
--sip-include-dir=DIR SIP include directory (location of sip.h)
--sip-dir=DIR base directory for SIP files
Alternatively, these can be given as environment variables SIP_EXE,
SIP_INCLUDE_DIR and SIP_DIR, respectively. Environment variables have
the advantage that the build_ext stage does not have to be done
separately.
1.1.4 Qt build parameters
=========================
By default, the qmake executable is used to find the locations of the
Qt include and library directories. The build searches for qmake under
the names qmake-qt5, qmake, qmake5.exe and qmake.exe. The location of
qmake and its return values can be overriden with the following
build_ext options:
--qmake-exe=EXE qmake exe
--qt-include-dir=DIR base Qt include directory
--qt-library-dir=DIR Qt library directory
Alternatively, these can be overridden with the enviroment variables
QMAKE_EXE, QT_INCLUDE_DIR and QT_LIBRARY_DIR, respectively.
Environment variables have the advantage that the build_ext stage does
not have to be done separately.
1.3 Running in-place
====================
......@@ -119,8 +148,8 @@ can currently be run from its own directory. Before this can work, the
helper modules must be compiled and copied into the appropriate
location.
# tar xzf veusz-2.2.2.tar.gz [change version here]
# cd veusz-2.2.2
# tar xzf veusz-3.0.1.tar.gz [change version here]
# cd veusz-3.0.1
# python setup.py build [or use python3 here]
# cp build/*/veusz/helpers/*.so veusz/helpers/
......@@ -141,8 +170,8 @@ work on all distributions due to glibc/library
incompatibilities. Simply unpack the tar file and run the main
executable:
# tar xf veusz-2.2.2-linux-x86.tar.xz [change version here]
# cd veusz-2.2.2-linux-x86
# tar xf veusz-3.0.1-linux-x86.tar.xz [change version here]
# cd veusz-3.0.1-linux-x86
# ./veusz
2.2 Installing in Windows
......
Metadata-Version: 1.1
Name: veusz
Version: 3.0
Version: 3.0.1
Summary: A scientific plotting package
Home-page: https://veusz.github.io/
Author: Jeremy Sanders
......
Veusz 3.0
---------
Veusz 3.0.1
-----------
https://veusz.github.io
Veusz is a 2D and 3D scientific plotting package. It is designed to
......@@ -12,6 +12,20 @@ SAMP interfaces to its plotting facilities. It also allows for
manipulation and editing of datasets. Data can be captured from
external sources such as Internet sockets or other programs.
Changes in 3.0.1:
* Change in build system to use qmake to find Qt locations. This is to fix
the build inside Anaconda. Also Qt and sip parameters can now be given
as environment variables.
* Fix problem when picking points with too many non-finite values
* Change default SVG export DPI to 96 to match inkscape and provide
option in dialog to choose export DPI
* Allow %PAGE% and %PAGENAME% in export filename for single page output
* Fix failing fitting due to iminuit differences
* Fix crash if both ends of part of broken axis widget are the same for
EMF exporting
* Update to Qt 5.11.1 and update PyQt and sip in Windows binary
* Build Mac and Linux binaries with EMF export
Changes in 3.0:
* New 3D support for plotting points, functions, surfaces and volumes
* Add --export-option parameter for command line exporting control
......
......@@ -8,6 +8,7 @@ from __future__ import division, print_function, absolute_import
import os
import sys
import sysconfig
import subprocess
from distutils.sysconfig import customize_compiler
import distutils.command.build_ext
......@@ -18,13 +19,6 @@ import PyQt5.QtCore
##################################################################
# try to get various useful things we need in order to build
QT_LIB_DIR = PyQt5.QtCore.QLibraryInfo.location(
PyQt5.QtCore.QLibraryInfo.LibrariesPath)
QT_INC_DIR = PyQt5.QtCore.QLibraryInfo.location(
PyQt5.QtCore.QLibraryInfo.HeadersPath)
QT_IS_FRAMEWORK = os.path.exists(
os.path.join(QT_LIB_DIR, 'QtCore.framework') )
SIP_FLAGS = PyQt5.QtCore.PYQT_CONFIGURATION['sip_flags']
try:
......@@ -43,19 +37,33 @@ else:
##################################################################
def findSipOnPath():
'''Get SIP executable from PATH.'''
def replace_suffix(path, new_suffix):
return os.path.splitext(path)[0] + new_suffix
def find_on_path(names, mainname):
"""From a list of names of executables, find the 1st one on a path.
mainname is the generic name to report
"""
path = os.getenv('PATH', os.path.defpath)
pathparts = path.split(os.path.pathsep)
for cmd in 'sip', 'sip5', 'sip.exe', 'sip5.exe':
for cmd in names:
for dirname in pathparts:
cmdtry = os.path.join(dirname.strip('"'), cmd)
if os.path.isfile(cmdtry) and os.access(cmdtry, os.X_OK):
return cmdtry
raise RuntimeError('Could not find SIP executable')
def replace_suffix(path, new_suffix):
return os.path.splitext(path)[0] + new_suffix
raise RuntimeError('Could not find %s executable' % mainname)
def read_command_output(cmd):
"""Get text from a run command."""
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
universal_newlines=True)
stdout, stderr = p.communicate()
if p.returncode != 0:
raise RuntimeError('Command %s returned error' % str(cmd))
return stdout.strip()
class build_ext(distutils.command.build_ext.build_ext):
......@@ -69,6 +77,12 @@ class build_ext(distutils.command.build_ext.build_ext):
'override sip file directory'),
('sip-include-dir=', None,
'override sip include directory'),
('qmake-exe=', None,
'override qmake executable'),
('qt-include-dir=', None,
'override Qt include directory'),
('qt-library-dir=', None,
'override Qt library directory'),
]
def initialize_options(self):
......@@ -76,6 +90,9 @@ class build_ext(distutils.command.build_ext.build_ext):
self.sip_exe = None
self.sip_dir = None
self.sip_include_dir = None
self.qmake_exe = None
self.qt_include_dir = None
self.qt_library_dir = None
def _get_sip_output_list(self, sbf):
'''
......@@ -91,14 +108,82 @@ class build_ext(distutils.command.build_ext.build_ext):
return out
raise RuntimeError('cannot parse SIP-generated "%s"' % sbf)
def get_cpp_includes(self):
incdirs = [QT_INC_DIR]
def _get_sip_exe(self, build_cmd):
"""Get exe for sip. Sources are:
--sip-exe option, environment, DEF_SIP_BIN, search on path."""
return (
build_cmd.sip_exe or
os.environ.get('SIP_EXE') or
DEF_SIP_BIN or
find_on_path(
('sip5', 'sip-qt5', 'sip', 'sip5.exe', 'sip.exe'), 'sip')
)
def _get_sip_inc_dir(self, build_cmd):
"""Get include directory for sip."""
return (
build_cmd.sip_include_dir or
os.environ.get('SIP_INCLUDE_DIR') or
DEF_SIP_INC_DIR or
sysconfig.get_path('include')
)
def _get_sip_dir(self, build_cmd):
"""Get sip directory."""
data_dir = sys.prefix if sys.platform=='win32' else sys.prefix+'/share'
return (
build_cmd.sip_dir or
os.environ.get('SIP_DIR') or
DEF_SIP_DIR or
os.path.join(data_dir, 'sip')
)
def _get_qmake(self, build_cmd):
"""Get qmake executable."""
return (
build_cmd.qmake_exe or
os.environ.get('QMAKE_EXE') or
find_on_path(
('qmake-qt5', 'qmake5', 'qmake', 'qmake5.exe', 'qmake.exe'),
'qmake')
)
def _get_qt_inc_dir(self, build_cmd):
"""Get Qt include directory."""
return (
build_cmd.qt_include_dir or
os.environ.get('QT_INCLUDE_DIR') or
read_command_output(
[self._get_qmake(build_cmd), '-query', 'QT_INSTALL_HEADERS'])
)
def _get_qt_library_dir(self, build_cmd):
"""Get Qt library directory."""
return (
build_cmd.qt_library_dir or
os.environ.get('QT_LIBRARY_DIR') or
read_command_output(
[self._get_qmake(build_cmd), '-query', 'QT_INSTALL_LIBS'])
)
def _is_qt_framework(self, build_cmd):
"""Is the Qt a framework?"""
return os.path.exists(
os.path.join(
self._get_qt_library_dir(build_cmd), 'QtCore.framework'))
def _get_cpp_includes(self, build_cmd):
"""Get list of include directories to add."""
inc_dir = self._get_qt_inc_dir(build_cmd)
incdirs = [inc_dir]
for mod in ('QtCore', 'QtGui', 'QtWidgets', 'QtXml'):
if QT_IS_FRAMEWORK:
if self._is_qt_framework(build_cmd):
incdirs.append(
os.path.join(QT_LIB_DIR, mod + '.framework', 'Headers') )
os.path.join(
self._get_qt_library_dir(build_cmd),
mod+'.framework', 'Headers') )
else:
incdirs.append( os.path.join(QT_INC_DIR, mod) )
incdirs.append(os.path.join(inc_dir, mod))
return incdirs
def swig_sources(self, sources, extension=None):
......@@ -110,15 +195,11 @@ class build_ext(distutils.command.build_ext.build_ext):
build_cmd = self.get_finalized_command('build_ext')
# executable in order of priority using or
sip_exe = build_cmd.sip_exe or DEF_SIP_BIN