diff options
| -rw-r--r-- | TODO | 2 | ||||
| -rw-r--r-- | cuedump.py | 2 | ||||
| -rwxr-xr-x | cutter.py (renamed from cutter) | 14 | ||||
| -rw-r--r-- | cutter/__init__.py | 0 | ||||
| -rw-r--r-- | cutter/coding.py (renamed from coding.py) | 0 | ||||
| -rw-r--r-- | cutter/config.py (renamed from config.py) | 2 | ||||
| -rw-r--r-- | cutter/cue.py (renamed from cue.py) | 0 | ||||
| -rw-r--r-- | cutter/formats/__base__.py (renamed from formats/__base__.py) | 0 | ||||
| -rw-r--r-- | cutter/formats/__init__.py (renamed from formats/__init__.py) | 0 | ||||
| -rw-r--r-- | cutter/formats/flac.py (renamed from formats/flac.py) | 4 | ||||
| -rw-r--r-- | cutter/formats/mp3.py (renamed from formats/mp3.py) | 4 | ||||
| -rw-r--r-- | cutter/formats/ogg.py (renamed from formats/ogg.py) | 4 | ||||
| -rw-r--r-- | cutter/formats/wav.py (renamed from formats/wav.py) | 2 | ||||
| -rw-r--r-- | cutter/splitter.py (renamed from splitter.py) | 6 | ||||
| -rw-r--r-- | cutter/tools.py (renamed from tools.py) | 0 | ||||
| -rw-r--r-- | setup.py | 28 |
16 files changed, 47 insertions, 21 deletions
@@ -6,5 +6,5 @@ OK 5. add support of config file with default options OK 6. copy file instead of convert if possible OK 7. substitute odd symbols in track names OK 8. add charset coding argument -9. prepare setup +OK 9. prepare setup 10. create default config on startup @@ -1,7 +1,7 @@ from os.path import basename import sys -import cue +from cutter import cue if sys.version_info.major == 2: class Encoded: @@ -1,11 +1,9 @@ -#!/usr/bin/python +#!/usr/bin/env python -from coding import to_unicode, to_bytes -from splitter import Splitter -from tools import * - -import formats -import cue +from cutter import formats, cue +from cutter.coding import to_unicode, to_bytes +from cutter.splitter import Splitter +from cutter.tools import * from optparse import OptionParser, OptionGroup @@ -13,7 +11,7 @@ import sys import os try: - import config + from cutter import config except Exception as err: printerr("import config failed: %s", err) sys.exit(0) diff --git a/cutter/__init__.py b/cutter/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/cutter/__init__.py diff --git a/coding.py b/cutter/coding.py index ffae410..ffae410 100644 --- a/coding.py +++ b/cutter/coding.py diff --git a/config.py b/cutter/config.py index c9e8b96..655c0d6 100644 --- a/config.py +++ b/cutter/config.py @@ -1,4 +1,4 @@ -from coding import is_python_v2, to_unicode +from . coding import is_python_v2, to_unicode import os try: diff --git a/formats/__base__.py b/cutter/formats/__base__.py index f17748a..f17748a 100644 --- a/formats/__base__.py +++ b/cutter/formats/__base__.py diff --git a/formats/__init__.py b/cutter/formats/__init__.py index 60a35fc..60a35fc 100644 --- a/formats/__init__.py +++ b/cutter/formats/__init__.py diff --git a/formats/flac.py b/cutter/formats/flac.py index 542aba2..2723344 100644 --- a/formats/flac.py +++ b/cutter/formats/flac.py @@ -1,5 +1,5 @@ -from formats.__base__ import * -from coding import to_bytes +from . __base__ import * +from .. coding import to_bytes import subprocess diff --git a/formats/mp3.py b/cutter/formats/mp3.py index 67019cc..ecccbb4 100644 --- a/formats/mp3.py +++ b/cutter/formats/mp3.py @@ -1,5 +1,5 @@ -from formats.__base__ import * -from coding import to_bytes +from . __base__ import * +from .. coding import to_bytes import subprocess import struct diff --git a/formats/ogg.py b/cutter/formats/ogg.py index 464ba8b..c881058 100644 --- a/formats/ogg.py +++ b/cutter/formats/ogg.py @@ -1,5 +1,5 @@ -from formats.__base__ import * -from coding import to_bytes +from . __base__ import * +from .. coding import to_bytes import subprocess diff --git a/formats/wav.py b/cutter/formats/wav.py index 66169fc..131ea73 100644 --- a/formats/wav.py +++ b/cutter/formats/wav.py @@ -1,4 +1,4 @@ -from formats.__base__ import * +from . __base__ import * class WavHandler(BaseHandler): name = "wav" diff --git a/splitter.py b/cutter/splitter.py index fbbafff..4c4abf8 100644 --- a/splitter.py +++ b/cutter/splitter.py @@ -1,7 +1,7 @@ -from coding import to_unicode, to_bytes -from tools import * +from . coding import to_unicode, to_bytes +from . tools import * -import formats +from . import formats from tempfile import mkdtemp from itertools import chain diff --git a/tools.py b/cutter/tools.py index 69d8bdb..69d8bdb 100644 --- a/tools.py +++ b/cutter/tools.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f91f257 --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +from distutils.core import setup + +import shutil +import os + +shutil.copyfile("cutter.py", "cutter/cutter") + +setup(name="cutter", + description="Cue split program", + author="Mikhail Osipov", + author_email="mike.osipov@gmail.com", + url="https://github.com/mykmo/cutter", + packages=["cutter", "cutter.formats"], + scripts=["cutter/cutter"] +) + +try: + os.remove("cutter/cutter") +except: + pass + +try: + if os.path.exists("build/"): + shutil.rmtree("build") +except: + pass |
