Skip to content

Commit

Permalink
release prep
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Nov 17, 2019
1 parent 722ff09 commit 572662c
Show file tree
Hide file tree
Showing 70 changed files with 81 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ default_context:
pypy3: "no"
release_date: "today"
requirements_yaml: "yes"
src_dir: "./src"
src_dir: "."
use_bitbucket: "no"
use_github: "yes"
use_make: "yes"
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
test*.id3
src/test/data
src/test/eyeD3-test-data*
test/data
test/eyeD3-test-data*
.idea/
.cookiecutter.md5
_misc/
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ and has been contributed to by (ordered by date of first contribution):
* Mic92@users.noreply.github.com
* gabrieldiegoteixeira@gmail.com
* guillaume.web@gmail.com
* tim.gates@iress.com
* zhumumu@gmail.com
29 changes: 29 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,35 @@ Release History

.. :changelog:
v0.9a2 (2019-11-17)
------------------------

New
~~~
- Original artist support (TOPE frame, --orig-artist)
- Python 3.8 supported.

Changes
~~~~~~~
- Regenerated grako parser.
- Moved src/* to top-level repo directory.

Fix
~~~
- ID3 v2.3 to v2.4 date conversion.
- Match mp3 mime-types against all possible mime-types.
Specifically, application/x-font-gdos. Fixes #338
- Fix simple typo: titel -> title. <tim.gates@iress.com>
- Fixed: load the right config file in arguments. <zhumumu@gmail.com>
- Fix issue tracker link. Fixes #333.
- Fixed art plugin when `pylast` is not installed.

Other
~~~~~
- Added original_artist for `jsontag`
- TypeError and ValueError from _setNum.


v0.9a1 (2019-03-16)
------------------------

Expand Down
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include tox.ini
graft docs
prune docs/_build

recursive-include src/test *.py
recursive-include test *.py

exclude .cookiecutter.yml
exclude .gitchangelog.rc
Expand All @@ -20,8 +20,8 @@ global-exclude *.py[co]
include requirements.txt
recursive-include requirements *.txt *.yml

recursive-include src/eyed3 *.py
include src/eyed3/plugins/DisplayPattern.ebnf
recursive-include eyed3 *.py
include eyed3/plugins/DisplayPattern.ebnf
recursive-include examples *

exclude fabfile.py
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
clean-pyc clean-build clean-patch clean-local clean-test-data \
test-all test-data build-release freeze-release tag-release \
pypi-release web-release github-release cookiecutter requirements
SRC_DIRS = ./src/eyed3
TEST_DIR = ./src/test
SRC_DIRS = ./eyed3
TEST_DIR = ./test
NAME ?= Travis Shirk
EMAIL ?= travis@pobox.com
GITHUB_USER ?= nicfit
Expand All @@ -17,7 +17,7 @@ CHANGELOG = HISTORY.rst
CHANGELOG_HEADER = v${VERSION} ($(shell date --iso-8601))$(if ${RELEASE_NAME}, : ${RELEASE_NAME},)
TEST_DATA = eyeD3-test-data
TEST_DATA_FILE = ${TEST_DATA}.tgz
TEST_DATA_DIR ?= $(shell pwd)/src/test
TEST_DATA_DIR ?= $(shell pwd)/test

help:
@echo "test - run tests quickly with the default Python"
Expand Down Expand Up @@ -96,17 +96,17 @@ test-data:
wget --quiet "http://eyed3.nicfit.net/releases/${TEST_DATA_FILE}" \
-O ${TEST_DATA_DIR}/${TEST_DATA_FILE}
tar xzf ${TEST_DATA_DIR}/${TEST_DATA_FILE} -C ${TEST_DATA_DIR}
cd src/test && rm -f ./data && ln -s ${TEST_DATA_DIR}/${TEST_DATA} ./data
cd test && rm -f ./data && ln -s ${TEST_DATA_DIR}/${TEST_DATA} ./data

clean-test-data:
-rm src/test/data
-rm src/test/${TEST_DATA_FILE}
-rm test/data
-rm test/${TEST_DATA_FILE}

pkg-test-data:
tar czf ./build/${TEST_DATA_FILE} -C ./src/test ./eyeD3-test-data
tar czf ./build/${TEST_DATA_FILE} -C ./test ./eyeD3-test-data

coverage:
pytest --cov=./src/eyed3 \
pytest --cov=./eyed3 \
--cov-report=html --cov-report term \
--cov-config=setup.cfg ${TEST_DIR}

Expand Down Expand Up @@ -148,9 +148,9 @@ pre-release: lint test changelog requirements
false; \
fi
IFS=$$'\n';\
for auth in `git authors --list | sed 's/.* <\(.*\)>/\1/'`; do \
for auth in `git authors --list | sed 's/.* <\(.*\)>/\1/' | grep -v users.noreply.github.com`; do \
echo "Checking $$auth...";\
grep "$$auth" AUTHORS.rst || echo "* $$auth" >> AUTHORS.rst;\
grep "$$auth" AUTHORS.rst || echo " * $$auth" >> AUTHORS.rst;\
done
@test -n "${GITHUB_USER}" || (echo "GITHUB_USER not set, needed for github" && false)
@test -n "${GITHUB_TOKEN}" || (echo "GITHUB_TOKEN not set, needed for github" && false)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.join("./src", os.path.dirname(cwd))
project_root = os.path.join("./", os.path.dirname(cwd))

# Insert the project root dir as the first element in the PYTHONPATH.
# This lets us ensure that the source package is imported, and that its
Expand Down
4 changes: 2 additions & 2 deletions etc/mycog.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ def _runcog(options, uncog=False):


def main():
sys.path.append("./src")
sys.path.append("./")
try:
_runcog(options)
finally:
sys.path.remove("./src")
sys.path.remove("./")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion examples/cli_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ eyeD3 --plugin=genres
# [[[endsection]]]

# [[[section LAME_PLUGIN]]]
eyeD3 -P lameinfo src/test/data/notag-vbr.mp3
eyeD3 -P lameinfo test/data/notag-vbr.mp3
# [[[endsection]]]

# [[[section PLUGINS_LIST]]]
Expand Down
2 changes: 1 addition & 1 deletion src/eyed3/__about__.py → eyed3/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __parse_version(v): # pragma: nocover
return ver, rel, ver_info


__version__ = "0.9a1"
__version__ = "0.9a2"
__release_name__ = ""
__years__ = "2002-2019"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/eyed3/main.py → eyed3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ def _main():
warnings.simplefilter("ignore", PendingDeprecationWarning)
# Must delay the import of ipdb as say as possible because
# of https://github.com/gotcha/ipdb/issues/48
import ipdb as pdb
import ipdb as pdb # noqa
except ImportError:
import pdb
import pdb # noqa

e, m, tb = sys.exc_info()
pdb.post_mortem(tb)
Expand Down
File renamed without changes.
27 changes: 14 additions & 13 deletions src/eyed3/mp3/headers.py → eyed3/mp3/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,38 +59,39 @@ def isBOM(buffer, pos):
except IndexError:
return False

def find_sync(fp, start_pos=0):
CHUNK_SIZE = 8192 # Measured as optimal
def find_sync(_fp, _pos=0):
chunk_sz = 8192 # Measured as optimal

fp.seek(start_pos)
data = fp.read(CHUNK_SIZE)
_fp.seek(_pos)
data = _fp.read(chunk_sz)

while data:
pos = 0
while pos >= 0 and pos < CHUNK_SIZE:
while 0 <= pos < chunk_sz:
pos = data.find(b"\xff", pos)
if pos == -1:
break

if not isBOM(data, pos):
header = data[pos:pos + 4]
if len(header) == 4:
return (start_pos + pos, header)
h = data[pos:pos + 4]
if len(h) == 4:
return tuple([_pos + pos, h])

pos += 1

start_pos += len(data)
data = fp.read(CHUNK_SIZE)
_pos += len(data)
data = _fp.read(chunk_sz)

return (None, None)
return None, None

sync_pos, header_bytes = find_sync(fp, start_pos)
while sync_pos is not None:
header = bytes2dec(header_bytes)
if isValidHeader(header):
return (sync_pos, header, header_bytes)
return tuple([sync_pos, header, header_bytes])
sync_pos, header_bytes = find_sync(fp, start_pos + sync_pos + 2)
return (None, None, None)

return None, None, None


def timePerFrame(mp3_header, vbr):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
parser generation:
$ python -m grako --name DisplayPattern \
-o src/eyed3/plugins/_display_parser.py \
src/eyed3/plugins/DisplayPattern.ebnf
-o eyed3/plugins/_display_parser.py \
eyed3/plugins/DisplayPattern.ebnf
*)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Sphinx==1.8.3
check-manifest==0.37
cogapp
flake8==3.7.9
hg+https://nicfit@bitbucket.org/nicfit/sphinxcontrib-bitbucket
ipdb==0.11
nicfit.py[cookiecutter]==0.8.5
paver
pss==1.42
pyaml==18.11.0
sphinx-issues==1.2.0
Expand Down
2 changes: 2 additions & 0 deletions requirements/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ dev:
#- sphinxcontrib-bitbucket
- hg+https://nicfit@bitbucket.org/nicfit/sphinxcontrib-bitbucket
#- git+https://github.com/nicfit/gitchangelog.git
- cogapp
- paver
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
factory-boy==2.12.0
pytest
pytest-cov==2.8.1
pytest-runner==5.2
pytest>=5.0
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def getPackageInfo():

# __about__
info_fpath = os.path.join(os.path.abspath(os.path.dirname(__file__)),
"./src",
".",
"eyed3",
"__about__.py")
with io.open(info_fpath, encoding='utf-8') as infof:
Expand Down Expand Up @@ -145,13 +145,13 @@ def package_files(directory, prefix=".."):
warnings.filterwarnings("ignore", message="Unknown distribution option")
warnings.filterwarnings("ignore", message="Normalizing")
setup(classifiers=classifiers,
package_dir={"eyed3": "./src/eyed3"},
packages=find_packages("./src",
package_dir={"eyed3": "./eyed3"},
packages=find_packages("./",
exclude=["test", "test.*"]),
zip_safe=False,
platforms=["Any"],
keywords=["id3", "mp3", "python"],
test_suite="./src/tests",
test_suite="./tests",
include_package_data=True,
package_data={},
entry_points={
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist = clean, py36, py37, py38, report
commands = coverage erase

[testenv]
commands = coverage run --rcfile=setup.cfg --source ./src/eyed3 --append -m \
pytest {posargs:--verbose ./src/test}
commands = coverage run --rcfile=setup.cfg --source ./eyed3 --append -m \
pytest {posargs:--verbose ./test}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements/test.txt
Expand Down

0 comments on commit 572662c

Please sign in to comment.