diff --git a/example_auto_nodes.py b/example_auto_nodes.py index 103abd6e..024b0391 100644 --- a/example_auto_nodes.py +++ b/example_auto_nodes.py @@ -1,12 +1,15 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -from NodeGraphQt import NodeGraph, setup_context_menu, \ - QtWidgets, QtCore, PropertiesBinWidget, BackdropNode + +from Qt import QtWidgets, QtCore +from NodeGraphQt import (NodeGraph, setup_context_menu, + PropertiesBinWidget, BackdropNode,) from example_auto_nodes import Publish, RootNode, update_nodes, setup_node_menu -import importlib -import inspect -import sys + import os +import sys +import inspect +import importlib def get_nodes_from_folder(folder_path): diff --git a/example_auto_nodes/input_nodes.py b/example_auto_nodes/input_nodes.py index fb158574..4daa16ea 100644 --- a/example_auto_nodes/input_nodes.py +++ b/example_auto_nodes/input_nodes.py @@ -1,4 +1,4 @@ -from NodeGraphQt import QtCore +from Qt import QtCore from NodeGraphQt.constants import (NODE_PROP_VECTOR2, NODE_PROP_VECTOR3, NODE_PROP_VECTOR4) diff --git a/example_nodes/input_nodes.py b/example_nodes/input_nodes.py index 207103a6..81cf9d74 100644 --- a/example_nodes/input_nodes.py +++ b/example_nodes/input_nodes.py @@ -1,5 +1,6 @@ import os -from NodeGraphQt import BaseNode, QtCore +from Qt import QtCore +from NodeGraphQt import BaseNode class DataInputNode(BaseNode): @@ -85,4 +86,4 @@ def __init__(self): self.view.widgets['combo'].value_changed.connect(self.update_stream) def run(self): - self.set_property('out', eval(self.get_property('combo'))) \ No newline at end of file + self.set_property('out', eval(self.get_property('combo'))) diff --git a/example_nodes/logic_nodes.py b/example_nodes/logic_nodes.py index 22d4996d..82a0ccc2 100644 --- a/example_nodes/logic_nodes.py +++ b/example_nodes/logic_nodes.py @@ -1,4 +1,5 @@ -from NodeGraphQt import BaseNode, QtCore +from Qt import QtCore +from NodeGraphQt import BaseNode class IfNode(BaseNode): diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..68b382e0 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,32 @@ +[metadata] +license = MIT License +license_file = LICENSE.md +long_description = file: README.md +long_description_content_type = text/markdown +description = Node graph framework for PySide2/PyQt5 that can be + implemented and re-purposed into applications. +classifiers = Operating System :: OS Independent + License :: OSI Approved :: MIT License + Programming Language :: Python :: 3.6 +url = https://github.com/jchanvfx/NodeGraphQt +project_urls = + Documentation = https://jchanvfx.github.io/NodeGraphQt/api/html/index.html + Source = https://github.com/jchanvfx/NodeGraphQt/ + Tracker = https://github.com/jchanvfx/NodeGraphQt/issues + +[options] +packages = find: +include_package_data = True +python_requires = >=3.6 +install_requires = + Qt.py>=1.2.0 + +[options.extras_require] +PySide2 = PySide2>=5.12 + +[options.packages.find] +exclude = example_nodes + +[options.package_data] +NodeGraphQt = widgets/icons/down_arrow.png + widgets/icons/node_base.png diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 915e4f89..fdd49445 --- a/setup.py +++ b/setup.py @@ -1,53 +1,15 @@ -#!/usr/bin/python +#! /usr/bin/env python3 # -*- coding: utf-8 -*- -import os -import sys import setuptools - -sys.path.append(os.path.join(os.path.dirname(__file__), "NodeGraphQt")) - -import pkg_info - -with open('README.md', 'r') as fh: - long_description = fh.read() - -with open('requirements.txt') as f: - requirements = f.read().splitlines() - -description = ( - 'Node graph framework that can be re-implemented into applications that ' - 'supports PySide & PySide2' -) -classifiers = [ - 'Operating System :: OS Independent', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.6', - 'Documentation :: https://jchanvfx.github.io/NodeGraphQt/api/html/index.html', - 'Source :: https://github.com/jchanvfx/NodeGraphQt/', -] +from NodeGraphQt import pkg_info setuptools.setup( name=pkg_info.__module_name__, version=pkg_info.__version__, author=pkg_info.__author__, - author_email='', - description=description, - long_description=long_description, - long_description_content_type='text/markdown', - url=pkg_info.__url__, - packages=setuptools.find_packages(exclude=['example_nodes']), - classifiers=classifiers, - install_requires=requirements, - include_package_data=True, - python_requires='>=3.6', - extras_require={ - 'PySide2': ['PySide2>=5.12'] - } ) -""" -python setup.py sdist -sudo python setup.py install -""" +# python3 setup.py sdist +# python3 setup.py install --prefix ~/.local/