Skip to content

Commit

Permalink
Converted to using package system
Browse files Browse the repository at this point in the history
Put the author, version and any distribution specific data into a package.json file. This lets the generation of a distributable zip file to be created automatically.
  • Loading branch information
Masstrix committed May 3, 2022
1 parent bcebead commit 6da3adb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 10 additions & 4 deletions notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
#################################################################
"""
import os, json
from os.path import join, dirname

__version__ = (0, 1, 1)
__author__ = 'Matthew Denton'
# Load the current package data.
package_json = None
with open(join(dirname(__file__), 'package.json')) as file:
package_json = json.loads(file.read())

if package_json:
__version__ = package_json['version']
__author__ = package_json['author']

from dataclasses import dataclass
from PySide2 import QtCore, QtGui
Expand All @@ -30,8 +38,6 @@
from maya.OpenMaya import MSceneMessage
from datetime import datetime, timedelta
from math import floor
import os
import json


WTITLE = 'Notes'
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": "0.1.1",
"author": "Matthew Denton",

"dist": {
"name": "Notes"
}
}

0 comments on commit 6da3adb

Please sign in to comment.