Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
except ImportError, excp:
from setuptools import setup
import pydot
import os
os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
os.environ['COPYFILE_DISABLE'] = 'true'
setup( name = 'pydot',
version = pydot.__version__,
description = 'Python interface to Graphviz\'s Dot',
author = 'Ero Carrera',
author_email = 'ero@dkbza.org',
url = 'http://code.google.com/p/pydot/',
download_url = 'http://pydot.googlecode.com/files/pydot-%s.tar.gz' % pydot.__version__,
license = 'MIT',
keywords = 'graphviz dot graphs visualization',
platforms = ['any'],
classifiers = ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries :: Python Modules'],
long_description = "\n".join(pydot.__doc__.split('\n')),
py_modules = ['pydot', 'dot_parser'],
install_requires = ['pyparsing', 'setuptools'],
data_files = [('.', ['LICENSE', 'README'])] )
#!/usr/bin/env python
try:
from distutils.core import setup
except ImportError, excp:
from setuptools import setup
import pydot
import os
os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
os.environ['COPYFILE_DISABLE'] = 'true'
setup( name = 'pydot',
version = pydot.__version__,
description = 'Python interface to Graphviz\'s Dot',
author = 'Ero Carrera',
author_email = 'ero@dkbza.org',
url = 'http://code.google.com/p/pydot/',
download_url = 'http://pydot.googlecode.com/files/pydot-%s.tar.gz' % pydot.__version__,
license = 'MIT',
keywords = 'graphviz dot graphs visualization',
platforms = ['any'],
classifiers = ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries :: Python Modules'],
lVersionDict["sklearn_version"] = sklearn.__version__;
import pandas as pd
lVersionDict["pandas_version"] = pd.__version__;
import numpy as np
lVersionDict["numpy_version"] = np.__version__;
import scipy as sc
lVersionDict["scipy_version"] = sc.__version__;
import matplotlib
lVersionDict["matplotlib_version"] = matplotlib.__version__
import pydot
lVersionDict["pydot_version"] = pydot.__version__
import sqlalchemy
lVersionDict["sqlalchemy_version"] = sqlalchemy.__version__
print([(k, lVersionDict[k]) for k in sorted(lVersionDict)]);
return lVersionDict;
formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
log.setLevel(logging.DEBUG)
nodebug = False
else:
nodebug = True
log.info('------- Start of run -------')
log.info("Dot2tex version % s" % __version__)
log.info("System information:\n"
" Python: %s \n"
" Platform: %s\n"
" Pydot: %s\n"
" Pyparsing: %s",
sys.version_info, platform.platform(),
pydot.__version__,pydot.dot_parser.pyparsing_version)
log.info('dot2tex called with: %s' % sys.argv)
log.info('Program started in %s' % os.getcwd())
if options.printversion:
#print options.hest
printVersionInfo()
sys.exit(0)
if len(args) == 0:
log.info('Data read from standard input')
dotdata = sys.stdin.readlines()
elif len(args) == 1:
try:
dotdata = open(args[0], 'rU').readlines()
except:
log.error("Could not open input file %s" % args[0])
sys.exit(1)
#!/usr/bin/env python
from distutils.core import setup
import pydot
setup( name = 'pydot',
version = pydot.__version__,
description = 'Python interface to Graphiz\'s Dot',
author = 'Ero Carrera',
author_email = 'ero@dkbza.org',
url = 'http://dkbza.org/pydot.html',
license = 'MIT',
platforms = ["any"],
classifiers = ['Development Status :: 5 - Production/Stable', \
'Intended Audience :: Science/Research', \
'License :: OSI Approved :: MIT License',\
'Natural Language :: English', \
'Operating System :: OS Independent', \
'Programming Language :: Python', \
'Topic :: Scientific/Engineering :: Visualization',\
'Topic :: Software Development :: Libraries :: Python Modules'],
long_description = "\n".join(pydot.__doc__.split('\n')),
py_modules = ['pydot', 'dot_parser'])
def get_graph(
self, graph_type='digraph', rank='same', simplify=True,
rankdir='TB', ranksep=0.2, compound=True):
# Lucid version of pydot bugs with certain settings, not sure which
# version exactly fixes those
if LooseVersion(pydot.__version__) > LooseVersion('1.0.10'):
graph = pydot.Dot('graphname',
graph_type=graph_type,
rank=rank,
rankdir=rankdir,
simplify=simplify
)
graph.set_ranksep(ranksep)
graph.set_compound(compound)
else:
graph = pydot.Dot('graphname',
graph_type=graph_type,
rank=rank,
rankdir=rankdir)
return graph
def findlibs(unpackreports, scantempdir, topleveldir, processors, scanenv, batcursors, batcons, scandebug=False, unpacktempdir=None):
## crude check for broken PyDot
if pydot.__version__ == '1.0.3' or pydot.__version__ == '1.0.2':
return
if 'overridedir' in scanenv:
try:
del scanenv['BAT_IMAGEDIR']
except:
pass
imagedir = scanenv.get('BAT_IMAGEDIR', os.path.join(topleveldir, "images"))
try:
os.stat(imagedir)
except:
## BAT_IMAGEDIR does not exist
try:
os.makedirs(imagedir)
except Exception, e:
return
Imported `pydot` module object.
Raises
--------
ImportError
If the `pydot` module is either unimportable _or_ importable but of
insufficient version.
'''
import pydot
# If the currently installed version of pydot is older than this minimum,
# raise an exception. The pkg_resources.parse_version() function bundled
# with setuptools is commonly regarded to be the most robust means of
# comparing version strings. (Your mileage may vary.)
if parse_version(pydot.__version__) < parse_version(PYDOT_VERSION_MIN):
raise ImportError(
'pydot %s < %s' % (pydot.__version__, PYDOT_VERSION_MIN))
return pydot
def findsymbols(unpackreports, scantempdir, topleveldir, processors, scanenv, batcursors, batcons, scandebug=False, unpacktempdir=None):
generategraphs = True
## crude check for broken PyDot
if pydot.__version__ == '1.0.3' or pydot.__version__ == '1.0.2':
generategraphs = False
## if KERNELSYMBOL_SVG is set in the configuration then the graph will
## also be generated in SVG format by writeGraph()
generatesvg = False
if scanenv.get("KERNELSYMBOL_SVG", 0) == '1':
generatesvg = True
if scanenv.get("KERNELSYMBOL_CSV", 0) == '1':
generatecsv = True
else:
generatecsv = False
if not (generategraphs or generatecsv):
return
## if KERNELSYMBOL_DEPENDENCIES is set in the configuration then the graph
lVersionDict["sklearn_version"] = sklearn.__version__;
import pandas as pd
lVersionDict["pandas_version"] = pd.__version__;
import numpy as np
lVersionDict["numpy_version"] = np.__version__;
import scipy as sc
lVersionDict["scipy_version"] = sc.__version__;
import matplotlib
lVersionDict["matplotlib_version"] = matplotlib.__version__
import pydot
lVersionDict["pydot_version"] = pydot.__version__
import sqlalchemy
lVersionDict["sqlalchemy_version"] = sqlalchemy.__version__
# print([(k, lVersionDict[k]) for k in sorted(lVersionDict)]);
return lVersionDict;