Skip to content

Commit

Permalink
fixed package import for usage as an external library
Browse files Browse the repository at this point in the history
  • Loading branch information
DataGreed committed Apr 5, 2022
1 parent 4bc414a commit cbc27c7
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

if __name__ == '__main__':

from parsers import patterns, project
from polytrackermidi.parsers import project

# # todo: remove this and implement tests
# p = patterns.PatternParser(
Expand Down
4 changes: 2 additions & 2 deletions polytracker2midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import sys
from sys import argv

from parsers import patterns, project
from exporters import midi
from polytrackermidi.parsers import patterns, project
from polytrackermidi.exporters import midi


def print_usage(message="", exit_program=True, exit_code=1):
Expand Down
3 changes: 1 addition & 2 deletions polytracker2text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import sys
from sys import argv

from parsers import patterns
from exporters import midi
from polytrackermidi.parsers import patterns


def print_usage(message="", exit_program=True, exit_code=1):
Expand Down
6 changes: 0 additions & 6 deletions polytrackermidi.py

This file was deleted.

2 changes: 2 additions & 0 deletions polytrackermidi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__author__ = "Alexey 'DataGreed' Strelkov"
__all__ = ['exporters', 'parsers']
File renamed without changes.
6 changes: 2 additions & 4 deletions exporters/midi.py → polytrackermidi/exporters/midi.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from typing import Optional

from midiutil.MidiFile import NoteOff

from parsers.patterns import Pattern, Note
from polytrackermidi.parsers.patterns import Pattern, Note
from midiutil import MIDIFile

from parsers.project import Song
from polytrackermidi.parsers.project import Song


class BaseMidiExporter:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion parsers/arps.py → polytrackermidi/parsers/arps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random
from enum import Enum

from parsers.chords import Chord
from polytrackermidi.parsers.chords import Chord

class ArpDirection(Enum):
raising = 1
Expand Down
3 changes: 1 addition & 2 deletions parsers/chords.py → polytrackermidi/parsers/chords.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from copy import deepcopy
from typing import List

from parsers.patterns import Note
from polytrackermidi.parsers.patterns import Note


class Chord:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion parsers/project.py → polytrackermidi/parsers/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import struct
from typing import List, Dict

from parsers.patterns import Pattern
from polytrackermidi.parsers.patterns import Pattern


class Song:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
requirements = fh.read()
setup(
name = 'polyendtracker-midi-export',
version = '0.2.4',
version = '0.3.0',
author = 'Alexey Strelkov',
author_email = '[email protected]',
license = 'MIT License',
description = 'Unofficial tool that converts Polyend Tracker *.mt project and *.mtp pattern files to midi files.',
long_description = long_description,
long_description_content_type = "text/markdown",
url = 'https://github.com/DataGreed/polyendtracker-midi-export',
py_modules = ['polytrackermidi'],
# py_modules = ['polytrackermidi'],
packages = find_packages(),
install_requires = [requirements],
python_requires='>=3.7',
Expand Down

0 comments on commit cbc27c7

Please sign in to comment.