]> granicus.if.org Git - graphviz/log
graphviz
3 years agofix missing sprint.h in CMakeLists.txt
Matthew Fernandez [Wed, 5 May 2021 04:21:24 +0000 (21:21 -0700)]
fix missing sprint.h in CMakeLists.txt

This has no effect on the build, but some IDEs are only able to see and scan
headers referenced in CMakeLists.txt, so this fixes browsability for those IDEs.

3 years agoMerge branch 'add-ubuntu-21.04-to_ci' into 'main'
Magnus Jacobsson [Mon, 10 May 2021 18:37:47 +0000 (18:37 +0000)]
Merge branch 'add-ubuntu-21.04-to_ci' into 'main'

Add Ubuntu 21.04 jobs to CI

Closes #2053

See merge request graphviz/graphviz!1940

3 years agoDisable detection of ODR violations in Ubuntu 21.04 ASan test
Magnus Jacobsson [Sun, 2 May 2021 13:02:48 +0000 (15:02 +0200)]
Disable detection of ODR violations in Ubuntu 21.04 ASan test

The mm2gv tools currently fails otherwise.

3 years agoAdd ubuntu21-04-cmake-ASan-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:31 +0000 (23:45 +0200)]
Add ubuntu21-04-cmake-ASan-test job to CI

3 years agoAdd ubuntu21-04-cmake-ASan-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:44:27 +0000 (23:44 +0200)]
Add ubuntu21-04-cmake-ASan-build job to CI

3 years agoAdd ubuntu21-04-cmake-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:12 +0000 (23:45 +0200)]
Add ubuntu21-04-cmake-test job to CI

3 years agoAdd ubuntu21-04-test job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:44:04 +0000 (23:44 +0200)]
Add ubuntu21-04-test job to CI

3 years agoAdd ubuntu21-04-cmake-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:43:47 +0000 (23:43 +0200)]
Add ubuntu21-04-cmake-build job to CI

3 years agoAdd ubuntu21-04-build job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:42:56 +0000 (23:42 +0200)]
Add ubuntu21-04-build job to CI

3 years agoAdd docker_push_ubuntu-21.04 job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:46:06 +0000 (23:46 +0200)]
Add docker_push_ubuntu-21.04 job to CI

3 years agoAdd docker_build_ubuntu-21.04 job to CI
Magnus Jacobsson [Thu, 29 Apr 2021 21:45:46 +0000 (23:45 +0200)]
Add docker_build_ubuntu-21.04 job to CI

3 years agoAdd Ubuntu 21.04 Dockerfile
Magnus Jacobsson [Thu, 29 Apr 2021 21:38:12 +0000 (23:38 +0200)]
Add Ubuntu 21.04 Dockerfile

3 years agoMerge branch 'uwin' into 'main'
Matthew Fernandez [Sun, 9 May 2021 02:05:47 +0000 (02:05 +0000)]
Merge branch 'uwin' into 'main'

clean up references to `__IMPORT__` and `__EXPORT__`

See merge request graphviz/graphviz!1944

3 years agoclean up references to `__IMPORT__` and `__EXPORT__`
Saleem Abdulrasool [Mon, 3 May 2021 00:36:29 +0000 (17:36 -0700)]
clean up references to `__IMPORT__` and `__EXPORT__`

This removes any reference to the custom `__IMPORT__` and `__EXPORT__`
macros.  These are remnants from supporting uwin.  However, the need for
uwin is greatly diminished by proper native Windows support for the
library.

Furthermore, the functionality that this enables will be restored
imminently by means of decoration of public interfaces.

The uwin system used `_BLD_STATIC` to indicate a static build and
`__DYNAMIC__` to indicate a shared build.  Furthermore, it used
`_BLD_DLL` to indicate a dynamic library on Windows, that is a DLL.
This augmented the check of `_DLL` which is the Microsoft specified
define that indicates a shared library build.  Based upon the state of
these four flags (why four flags for 2 states?) it then defined
`__IMPORT__` and `__EXPORT__` to `__declspec(dllimport)` and
`__declspec(dllexport)` respectively.

To further complicate things, UWIN was built up during Windows 3.1,
which meant that it predated the linker support for DLL storage.
Instead, this is required work by the user, and it has special macros
for declaring the (now) synthetic import symbol as well as defining it.
This is now no longer required due to improved support in the compiler
and linker which will perform the necessary work.

On Unix, this synthetic symbol declaration and definition is not
required as the linker has always supported this for shared libraries -
it is responsible for creating the PLT which is roughly equivalent to
the IAT (technically, the IAT is both the PLT and the GOT).  This is now
also automated on Windows, at least for the past ~25 years.

This clean up is meant to simplify the migration to `[module]_EXPORTS`
as the "standard" macro which is defined by CMake (and is generally used
elsewhere now as well) to indicate that the symbols for the module
should be exported.  `_DLL` provides the necessary information whether a
DLL is being built or not.

With that history, it is clear that this is a regression for GraphViz on
uwin, the temporary breakage seems reasonable to simplify the migration.

3 years agoMerge branch 'smattr/EFD56267-3C28-4C03-9610-03639D89FCA3' into 'main'
Matthew Fernandez [Sat, 8 May 2021 21:42:02 +0000 (21:42 +0000)]
Merge branch 'smattr/EFD56267-3C28-4C03-9610-03639D89FCA3' into 'main'

remove redefining bool to int in Smyrna

See merge request graphviz/graphviz!1942

3 years agoreplace Smyrna header guards with more modern #pragma once
Matthew Fernandez [Sun, 2 May 2021 20:08:37 +0000 (13:08 -0700)]
replace Smyrna header guards with more modern #pragma once

3 years agoremove unused filterscallbacks.h
Matthew Fernandez [Sun, 2 May 2021 20:03:32 +0000 (13:03 -0700)]
remove unused filterscallbacks.h

3 years agoremove redefining bool to int in Smyrna
Matthew Fernandez [Sun, 2 May 2021 19:56:47 +0000 (12:56 -0700)]
remove redefining bool to int in Smyrna

This appears to have no effect, as C99 bools are not used anywhere in Smyrna or
in the headers included by viewport.h. However this is a trap waiting to cause
problems if/when C99 bools are used in these files.

3 years agoMerge branch 'smattr/610A0333-73CC-4DE3-9188-DAC1B96D3F2B' into 'main'
Matthew Fernandez [Sat, 8 May 2021 19:13:22 +0000 (19:13 +0000)]
Merge branch 'smattr/610A0333-73CC-4DE3-9188-DAC1B96D3F2B' into 'main'

port windows/bin/build.ps1 to Python

See merge request graphviz/graphviz!1941

3 years agoremove now-unused build.ps1
Matthew Fernandez [Sun, 2 May 2021 17:07:55 +0000 (10:07 -0700)]
remove now-unused build.ps1

3 years agoremove now-unused setup-and-build.ps1
Matthew Fernandez [Sun, 2 May 2021 16:51:56 +0000 (09:51 -0700)]
remove now-unused setup-and-build.ps1

3 years agocall Python script for Windows CI compilation instead of PowerShell
Matthew Fernandez [Sun, 2 May 2021 16:50:59 +0000 (09:50 -0700)]
call Python script for Windows CI compilation instead of PowerShell

Following the previous commit, ci/build_windows.py provides a drop in
replacement for the PowerShell script previously used for compilation.

3 years agoport windows/bin/build.ps1 to Python
Matthew Fernandez [Sun, 2 May 2021 16:45:44 +0000 (09:45 -0700)]
port windows/bin/build.ps1 to Python

This is a first step to moving away from PowerShell for CI scripts. PowerShell
has too many error prone characteristics and there is not enough knowledge about
it amongst the Graphviz maintainers.

3 years agoMerge branch 'smattr/8B3F2F18-8D38-4668-AAD4-F7EAEFDDB151' into 'main'
Matthew Fernandez [Sat, 8 May 2021 04:38:18 +0000 (04:38 +0000)]
Merge branch 'smattr/8B3F2F18-8D38-4668-AAD4-F7EAEFDDB151' into 'main'

Pylint warning squashing

See merge request graphviz/graphviz!1938

3 years agoremove duplicate shutil import
Matthew Fernandez [Sun, 2 May 2021 01:29:01 +0000 (18:29 -0700)]
remove duplicate shutil import

3 years agosquash a wrong-import-position Pylint warning
Matthew Fernandez [Sun, 2 May 2021 01:28:32 +0000 (18:28 -0700)]
squash a wrong-import-position Pylint warning

3 years agodisable Pylint warning about use of the global statement
Matthew Fernandez [Sun, 2 May 2021 01:26:41 +0000 (18:26 -0700)]
disable Pylint warning about use of the global statement

While this may be considered a code smell in larger Python code bases, the use
of global in the Graphviz scripts is reasonably well motivated.

3 years agodisable Pylint warning about too many local variables
Matthew Fernandez [Sun, 2 May 2021 01:25:23 +0000 (18:25 -0700)]
disable Pylint warning about too many local variables

This is not a significant issue in Graphviz scripts.

3 years agoport generate_configuration_table to argparse
Matthew Fernandez [Sun, 2 May 2021 01:23:58 +0000 (18:23 -0700)]
port generate_configuration_table to argparse

Removes a Pylint warning about using the deprecated optparse library.

3 years agoremove unused --verbose argument to configuration summarizer
Matthew Fernandez [Sun, 2 May 2021 01:14:15 +0000 (18:14 -0700)]
remove unused --verbose argument to configuration summarizer

3 years agodisable invalid-name Pylint warning
Matthew Fernandez [Sun, 2 May 2021 01:08:52 +0000 (18:08 -0700)]
disable invalid-name Pylint warning

Pylint has a very narrow idea of acceptable names. Things it does not like, such
as single letter variable names, are not really a problem in the Graphviz
scripts.

3 years agorename generate-configuration-table.py to be importable
Matthew Fernandez [Sun, 2 May 2021 01:07:15 +0000 (18:07 -0700)]
rename generate-configuration-table.py to be importable

Silences a Pylint warning.

3 years agodisable Pylint warning for subprocess.run without check argument
Matthew Fernandez [Sun, 2 May 2021 01:05:01 +0000 (18:05 -0700)]
disable Pylint warning for subprocess.run without check argument

Graphviz generally have a good use case for calling subprocess.run without
passing check.

3 years agodisable f-string in logging messages Pylint warning
Matthew Fernandez [Sun, 2 May 2021 01:01:14 +0000 (18:01 -0700)]
disable f-string in logging messages Pylint warning

This is generally considered error prone because you can include non-pure
operations in logging functions that your code accidentally depends on. However
the Graphviz scripts are simple enough that this is not a significant issue. The
use of f-strings pervasively makes for more consistent and readable scripts.

3 years agoMerge branch 'stdio-standard-macros' into 'main'
Matthew Fernandez [Sat, 8 May 2021 00:37:16 +0000 (00:37 +0000)]
Merge branch 'stdio-standard-macros' into 'main'

sfio: remove singular reference to `_BLD_stdio`

See merge request graphviz/graphviz!1943

3 years agosfio: remove singular reference to `_BLD_stdio`
Saleem Abdulrasool [Sun, 25 Apr 2021 03:11:10 +0000 (03:11 +0000)]
sfio: remove singular reference to `_BLD_stdio`

Remove the singular reference to `_BLD_stdio`.  This is part of a series
to remove unused build macros to unify on the CMake standard `*_EXPORTS`
macros.

3 years agoMerge branch 'smattr/39EB89E6-4BE4-4737-AE77-5C2B31922DBB' into 'main'
Matthew Fernandez [Thu, 6 May 2021 13:27:09 +0000 (13:27 +0000)]
Merge branch 'smattr/39EB89E6-4BE4-4737-AE77-5C2B31922DBB' into 'main'

remove unused tmsize10.clo

Closes #2061

See merge request graphviz/graphviz!1937

3 years agoremove unused tmsize10.clo
Matthew Fernandez [Fri, 30 Apr 2021 02:34:36 +0000 (19:34 -0700)]
remove unused tmsize10.clo

Fixes #2061.

3 years agoMerge branch 'smattr/ac55eb33-3e00-4d16-8daf-b70d0fec6825' into 'main'
Matthew Fernandez [Wed, 5 May 2021 15:39:05 +0000 (15:39 +0000)]
Merge branch 'smattr/ac55eb33-3e00-4d16-8daf-b70d0fec6825' into 'main'

remove unused md5 implementation in Smyrna

Closes #2050

See merge request graphviz/graphviz!1936

3 years agoremove now-unused md5 implementation in Smyrna
Matthew Fernandez [Thu, 29 Apr 2021 02:50:28 +0000 (19:50 -0700)]
remove now-unused md5 implementation in Smyrna

Closes #2050.

3 years agoremove unused get_md5_key
Matthew Fernandez [Thu, 29 Apr 2021 02:46:06 +0000 (19:46 -0700)]
remove unused get_md5_key

Related to #2050.

3 years agoremove unused fill_key function
Matthew Fernandez [Thu, 29 Apr 2021 02:40:03 +0000 (19:40 -0700)]
remove unused fill_key function

Related to #2050.

3 years agoremove now-unused orig_key field in Smyrna’s Viewinfo struct
Matthew Fernandez [Thu, 29 Apr 2021 02:39:08 +0000 (19:39 -0700)]
remove now-unused orig_key field in Smyrna’s Viewinfo struct

Related to #2050.

3 years agoremove dead stores to orig_key field in Smyrna
Matthew Fernandez [Thu, 29 Apr 2021 02:35:16 +0000 (19:35 -0700)]
remove dead stores to orig_key field in Smyrna

This field is never read from. Related to #2050.

3 years agoremove unused final_key field from Smyrna’s Viewinfo struct
Matthew Fernandez [Thu, 29 Apr 2021 02:29:33 +0000 (19:29 -0700)]
remove unused final_key field from Smyrna’s Viewinfo struct

Related to #2050.

3 years agoMerge branch 'smattr/2bfe1f77-53cc-4eda-bc00-454cd8893455' into 'main'
Matthew Fernandez [Wed, 5 May 2021 05:29:50 +0000 (05:29 +0000)]
Merge branch 'smattr/2bfe1f77-53cc-4eda-bc00-454cd8893455' into 'main'

remove use of unsigned ints for interacting with getopt

See merge request graphviz/graphviz!1935

3 years agogc: fix type of variable used for interacting with getopt
Matthew Fernandez [Thu, 29 Apr 2021 02:12:28 +0000 (19:12 -0700)]
gc: fix type of variable used for interacting with getopt

Similar to the prior commits. Squashes a -Wsign-compare warning and a
-Wsign-conversion warning.

3 years agogvmap: fix type of variables used for interacting with getopt
Matthew Fernandez [Thu, 29 Apr 2021 02:10:28 +0000 (19:10 -0700)]
gvmap: fix type of variables used for interacting with getopt

Similar to the prior commit. Squashes two -Wsign-compare warnings and two
-Wsign-conversion warnings.

3 years agoedgepaint: fix type of variable for interacting with getopt
Matthew Fernandez [Thu, 29 Apr 2021 02:08:52 +0000 (19:08 -0700)]
edgepaint: fix type of variable for interacting with getopt

Similar to 49fd8f62d8103d6e40a33922d2492a5ec3e3e76e, this location was using an
unsigned int for some reason. This change squashes a -Wsign-compare and a
-Wsign-conversion warning.

3 years agoMerge branch 'smattr/BB1ACA26-949E-46F0-AD76-06C877563ABC' into 'main'
Matthew Fernandez [Wed, 5 May 2021 01:37:27 +0000 (01:37 +0000)]
Merge branch 'smattr/BB1ACA26-949E-46F0-AD76-06C877563ABC' into 'main'

some cleanup of cmd/tools/dijkstra.c

See merge request graphviz/graphviz!1934

3 years agoremove some unnecessary bracketing
Matthew Fernandez [Wed, 28 Apr 2021 04:31:42 +0000 (21:31 -0700)]
remove some unnecessary bracketing

3 years agoremove unused struct name
Matthew Fernandez [Wed, 28 Apr 2021 04:13:51 +0000 (21:13 -0700)]
remove unused struct name

3 years agouse an unsigned type for indexing in dijkstra
Matthew Fernandez [Wed, 28 Apr 2021 04:13:13 +0000 (21:13 -0700)]
use an unsigned type for indexing in dijkstra

3 years agomark dijkstra function static
Matthew Fernandez [Wed, 28 Apr 2021 04:10:38 +0000 (21:10 -0700)]
mark dijkstra function static

This is unused outside of this file.

3 years agosquash some -Wsign-conversion warnings
Matthew Fernandez [Wed, 28 Apr 2021 04:09:36 +0000 (21:09 -0700)]
squash some -Wsign-conversion warnings

3 years agosquash some -Wunused-parameter warnings
Matthew Fernandez [Wed, 28 Apr 2021 04:08:29 +0000 (21:08 -0700)]
squash some -Wunused-parameter warnings

3 years agouse stronger types for dijkstra command line flags
Matthew Fernandez [Wed, 28 Apr 2021 04:04:25 +0000 (21:04 -0700)]
use stronger types for dijkstra command line flags

3 years agofree some allocated memory prior to exiting dijkstra
Matthew Fernandez [Wed, 28 Apr 2021 03:58:44 +0000 (20:58 -0700)]
free some allocated memory prior to exiting dijkstra

This is not strictly necessary, but aids debugging with tools like Valgrind.

3 years agoremove the use of 0 for pointers in dijkstra
Matthew Fernandez [Wed, 28 Apr 2021 03:55:47 +0000 (20:55 -0700)]
remove the use of 0 for pointers in dijkstra

3 years agouse calloc instead of malloc for some arrays in dijkstra
Matthew Fernandez [Wed, 28 Apr 2021 03:53:49 +0000 (20:53 -0700)]
use calloc instead of malloc for some arrays in dijkstra

3 years agoremove use of HUGE
Matthew Fernandez [Wed, 28 Apr 2021 03:51:32 +0000 (20:51 -0700)]
remove use of HUGE

HUGE_VAL is standard C, portable across environments.

3 years agoremove some commented out code
Matthew Fernandez [Wed, 28 Apr 2021 03:50:53 +0000 (20:50 -0700)]
remove some commented out code

3 years agoMerge branch 'smattr/6d5c1473-c70e-45ad-81b8-5a6386ba2986' into 'main'
Matthew Fernandez [Mon, 3 May 2021 15:03:40 +0000 (15:03 +0000)]
Merge branch 'smattr/6d5c1473-c70e-45ad-81b8-5a6386ba2986' into 'main'

add a test case to keep .vcxproj and .vcxproj.filters sources in sync

See merge request graphviz/graphviz!1932

3 years agoadd a test case to keep .vcxproj and .vcxproj.filters sources in sync
Matthew Fernandez [Tue, 27 Apr 2021 02:38:01 +0000 (19:38 -0700)]
add a test case to keep .vcxproj and .vcxproj.filters sources in sync

Inspired by reviewing !1925, I realized there are few safeguards for those of us
editing the .vcxproj files while not on Windows. This commit introduces a basic
seatbelt to try to keep these files in sync. In future we could extend this to
check for file existence and other consistency.

3 years agoMerge branch 'tred' into 'main'
Matthew Fernandez [Sun, 2 May 2021 16:04:57 +0000 (16:04 +0000)]
Merge branch 'tred' into 'main'

GVC: export 'gvToolTred'

Closes #2057

See merge request graphviz/graphviz!1925

3 years agoGVC: export 'gvToolTred'
Saleem Abdulrasool [Sun, 2 May 2021 16:04:57 +0000 (16:04 +0000)]
GVC: export 'gvToolTred'

3 years agoMerge branch 'close-the-door' into 'main'
Matthew Fernandez [Sun, 2 May 2021 04:02:54 +0000 (04:02 +0000)]
Merge branch 'close-the-door' into 'main'

xdot: remove unused Windows.h header

See merge request graphviz/graphviz!1930

3 years agoxdot: remove unused Windows.h header
Saleem Abdulrasool [Mon, 26 Apr 2021 02:45:47 +0000 (19:45 -0700)]
xdot: remove unused Windows.h header

This header is unused and does not need to be included.  Although for
most uses this does not impact anything, attempting to use this in a
Swift program causes problems due to the library being pulled into a
modular build.  This removal allows the use of xdot in Swift.

3 years agoMerge branch 'smattr/3C4AE1AF-408F-4CB2-9F54-0457CE6C3F52' into 'main'
Matthew Fernandez [Sun, 2 May 2021 02:44:34 +0000 (02:44 +0000)]
Merge branch 'smattr/3C4AE1AF-408F-4CB2-9F54-0457CE6C3F52' into 'main'

remove unused lib/inkpot

Closes #2054

See merge request graphviz/graphviz!1929

3 years agoremove some non-existent paths from MSVC include directories
Matthew Fernandez [Sun, 25 Apr 2021 23:25:03 +0000 (16:25 -0700)]
remove some non-existent paths from MSVC include directories

The reference directories were previously removed.

3 years agoremove unused lib/inkpot
Matthew Fernandez [Sun, 25 Apr 2021 23:22:00 +0000 (16:22 -0700)]
remove unused lib/inkpot

Closes #2054.

3 years agoMerge branch 'smattr/AB2A899C-BF99-4303-82F9-79AA1D1078F8' into 'main'
Matthew Fernandez [Sat, 1 May 2021 23:28:09 +0000 (23:28 +0000)]
Merge branch 'smattr/AB2A899C-BF99-4303-82F9-79AA1D1078F8' into 'main'

try to work around `lneato -?` flakiness on Windows

See merge request graphviz/graphviz!1928

3 years agotry to work around `lneato -?` flakiness on Windows
Matthew Fernandez [Sun, 25 Apr 2021 21:48:03 +0000 (14:48 -0700)]
try to work around `lneato -?` flakiness on Windows

Related to #1934.

3 years agoMerge branch 'smattr/880181C2-61D1-421D-9FA4-B15E4A19C741' into 'main'
Matthew Fernandez [Sat, 1 May 2021 22:30:58 +0000 (22:30 +0000)]
Merge branch 'smattr/880181C2-61D1-421D-9FA4-B15E4A19C741' into 'main'

remove /etc/redhat-release path in build script

See merge request graphviz/graphviz!1921

3 years agoremove /etc/redhat-release path in build script
Matthew Fernandez [Sat, 24 Apr 2021 18:10:15 +0000 (11:10 -0700)]
remove /etc/redhat-release path in build script

Every distro Graphviz CI now runs on appears to have an /etc/os-release, so this
code is unused.

3 years agoMerge branch 'smattr/3E2C5588-8462-437B-9A7B-2ADA9D63769C' into 'main'
Matthew Fernandez [Sat, 1 May 2021 19:00:04 +0000 (19:00 +0000)]
Merge branch 'smattr/3E2C5588-8462-437B-9A7B-2ADA9D63769C' into 'main'

clean up "#xxxxxx" color printing

See merge request graphviz/graphviz!1918

3 years agoabbreviate r2hex in lib/sparse
Matthew Fernandez [Sat, 24 Apr 2021 16:29:25 +0000 (09:29 -0700)]
abbreviate r2hex in lib/sparse

This is a shorter way of writing the same thing.

3 years agosimplify color printing in lib/sparse
Matthew Fernandez [Sat, 24 Apr 2021 16:26:30 +0000 (09:26 -0700)]
simplify color printing in lib/sparse

Equivalent of the previous commit, but applied to another function which is a
duplicate.

3 years agosimplify color printing in mm2gv
Matthew Fernandez [Sat, 24 Apr 2021 16:24:48 +0000 (09:24 -0700)]
simplify color printing in mm2gv

This is a shorter, more efficient way to accomplish the same thing.

3 years agoMerge branch 'smattr/747D40FC-E73B-4D36-A74A-99425E25AD8A' into 'main'
Matthew Fernandez [Sat, 1 May 2021 18:16:11 +0000 (18:16 +0000)]
Merge branch 'smattr/747D40FC-E73B-4D36-A74A-99425E25AD8A' into 'main'

remove assumption in Windows builds that python3.exe exists

Closes #2049

See merge request graphviz/graphviz!1920

3 years agoremove python3.exe copying in Windows CI
Matthew Fernandez [Sat, 24 Apr 2021 19:00:05 +0000 (12:00 -0700)]
remove python3.exe copying in Windows CI

With the prior couple of changes, neither the Windows build nor the test suite
relies on a python3.exe binary. So we can simplify Windows CI by removing these
steps, leaving only a python.exe binary. This is more reflective of the typical
environment a user will have too. Related to #2049.

3 years agocall Python as `python` instead of `python3` in MSBuild files
Matthew Fernandez [Sat, 24 Apr 2021 20:14:26 +0000 (13:14 -0700)]
call Python as `python` instead of `python3` in MSBuild files

This removes an assumption from these files that Python 3 is available as
`python3`. On a Windows system, it is typically python.exe and users have to
create their own python3.exe if they want to call it under this name. Related to
#2049.

3 years agouse CMake support to locate Python 3 before calling it
Matthew Fernandez [Sat, 24 Apr 2021 18:24:11 +0000 (11:24 -0700)]
use CMake support to locate Python 3 before calling it

This change means (1) the CMake build system will fail less cryptically when
Python 3 is unavailable and (2) the CMake build system is now able to locate and
use Python 3 even when it is not called `python3`. Related to #2049.

3 years agoremove test suite assumption that Python can be run as `python3`
Matthew Fernandez [Sat, 24 Apr 2021 17:46:03 +0000 (10:46 -0700)]
remove test suite assumption that Python can be run as `python3`

On Windows, python3.exe does not typically exist. The python.exe binary is
Python 3 and is intended to be called as just this. The CI setup currently works
around this by copying python.exe to python3.exe. This change removes any
dependency on python3 existing, which should ease life for both CI and Windows
users wanting to run the test suite. Closes #2049.

3 years agoremove unused cmake-build_and_test.sh script
Matthew Fernandez [Sat, 24 Apr 2021 17:42:37 +0000 (10:42 -0700)]
remove unused cmake-build_and_test.sh script

The CMake builds are driven from build.sh, not from this script.

3 years agoMerge branch 'independence-inn' into 'main'
Matthew Fernandez [Sat, 1 May 2021 05:36:43 +0000 (05:36 +0000)]
Merge branch 'independence-inn' into 'main'

build: use CMake to drive the position independence

See merge request graphviz/graphviz!1923

3 years agobuild: use CMake to drive the position independence
Saleem Abdulrasool [Sun, 25 Apr 2021 00:50:08 +0000 (17:50 -0700)]
build: use CMake to drive the position independence

This replaces the use of `-fPIC` with `CMAKE_POSITION_INDEPENDENT_CODE`
which is used by CMake to initialise the `POSITION_INDEPENDENT_CODE`
property on targets, which allows the portable way to indicate the
compiler-independent spelling for `-fPIC`.  This was previously unset on
MSVC because MSVC does not support the `-fPIC` option and Windows by
default is PIC by means of the base relocation of the binary.

3 years agoMerge branch 'smattr/8AC007D7-AEDE-49D4-800C-266AB9198BDD' into 'main'
Matthew Fernandez [Sat, 1 May 2021 01:17:15 +0000 (01:17 +0000)]
Merge branch 'smattr/8AC007D7-AEDE-49D4-800C-266AB9198BDD' into 'main'

squash some Pylint warnings

See merge request graphviz/graphviz!1919

3 years agoremove an unused variable
Matthew Fernandez [Sat, 24 Apr 2021 17:30:08 +0000 (10:30 -0700)]
remove an unused variable

3 years agoremove unused parameter to judge()
Matthew Fernandez [Sat, 24 Apr 2021 17:27:59 +0000 (10:27 -0700)]
remove unused parameter to judge()

3 years agodisable Pylint too-few-public-methods
Matthew Fernandez [Sat, 24 Apr 2021 17:26:24 +0000 (10:26 -0700)]
disable Pylint too-few-public-methods

What kind of a warning is this? A class with even a single method isn’t a
mistake. It’s likely abstraction or indicating something semantic to the reader.

3 years agoremove an unnecessary Python class
Matthew Fernandez [Sat, 24 Apr 2021 17:25:18 +0000 (10:25 -0700)]
remove an unnecessary Python class

3 years agosuppress an import-position Pylint warning
Matthew Fernandez [Sat, 24 Apr 2021 17:24:31 +0000 (10:24 -0700)]
suppress an import-position Pylint warning

3 years agosquash multiple-imports Pyint warning
Matthew Fernandez [Sat, 24 Apr 2021 17:23:56 +0000 (10:23 -0700)]
squash multiple-imports Pyint warning

3 years agoremove an unnecessary class in a Python file
Matthew Fernandez [Sat, 24 Apr 2021 17:22:56 +0000 (10:22 -0700)]
remove an unnecessary class in a Python file

3 years agoreplace tabs in one Python file
Matthew Fernandez [Sat, 24 Apr 2021 17:21:51 +0000 (10:21 -0700)]
replace tabs in one Python file

3 years agosquash no-else-after-return Pylint warnings
Matthew Fernandez [Sat, 24 Apr 2021 17:21:07 +0000 (10:21 -0700)]
squash no-else-after-return Pylint warnings

3 years agodisable Pylint too-many-branches and too-many-statements
Matthew Fernandez [Sat, 24 Apr 2021 17:18:12 +0000 (10:18 -0700)]
disable Pylint too-many-branches and too-many-statements

Pylint’s definition of “too many” is quite low, especially for the kind of glue
code we use Python for.

3 years agosquash Pylint warnings for multiple statements on a line
Matthew Fernandez [Sat, 24 Apr 2021 17:17:31 +0000 (10:17 -0700)]
squash Pylint warnings for multiple statements on a line

3 years agodisable Pylint redefined-builtin warning
Matthew Fernandez [Sat, 24 Apr 2021 17:15:51 +0000 (10:15 -0700)]
disable Pylint redefined-builtin warning

We do not care about redefining things like `input`.