Skip to content

Commit

Permalink
Merge branch 'modernize-dev' into develop
Browse files Browse the repository at this point in the history
see #151
  • Loading branch information
mete0r committed Sep 17, 2017
2 parents 276dd2b + ac2e369 commit 5e36f3f
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
/*.egg
/.eggs
/.installed.cfg
/.jip
/.jip_index
/.tox
/bin
/build
/develop-eggs
/data/pom.tpl
/dist
/docs/.build
/downloads
/eggs
/include
/javalib
/lib
/local
/oxt/pyhwp.egg.record
Expand Down
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: python
python:
- "2.7"
env:
- TOXENV=py27
matrix:
include:
- python: "2.7"
env: TOXENV=lint
- python: "2.7"
env: TOXENV=py27
- python: "pypy"
env: TOXENV=pypy
- python: "2.7"
env: TOXENV=jy27
allow_failures:
- python: "2.7"
env: TOXENV=jy27
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libxml2-utils xsltproc
install:
- pip install -U setuptools pip wheel jip
- pip install -U zc.buildout tox
- buildout
- tox --version
- sort --version
- env | sort
- if [ "$TOXENV" == "jy27" ]; then make install-jython; fi
script:
- tox
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
define ALL
update-requirements
install-jython
endef
ALL:=$(shell echo $(ALL)) # to remove line-feeds

Expand Down Expand Up @@ -64,3 +65,12 @@ notebook:
clitest:
$(VENV) env SAMPLES=samples clitest -1 --prefix 3 pyhwp-tests/cli_tests/hwp5proc.txt
$(VENV) env SAMPLES=samples clitest -1 --prefix 3 pyhwp-tests/cli_tests/hwp5odt.txt


.PHONY: install-jython
install-jython: parts/jython2.7/bin/jython
parts/jython2.7/bin/jython:
rm -rf parts/jython2.7
mkdir -p parts
$(VIRTUAL_ENV)/bin/jip install org.python:jython-installer:2.7.1b3
java -jar $(VIRTUAL_ENV)/javalib/jython-installer-2.7.1b3.jar -s -d $(PWD)/parts/jython2.7
12 changes: 6 additions & 6 deletions pyhwp-tests/cli_tests/hwp5proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ unpack 명령

$ rm -rf sample-5017
$ hwp5proc unpack samples/sample-5017.hwp
$ find sample-5017 -type f | sort | xargs sha1sum
$ find sample-5017 -type f | sort --dictionary | xargs sha1sum
25233fb7d96f387fbe07eadae65c7ba3cdccaab1 sample-5017/_05HwpSummaryInformation
a651496e95dd70a7a5c3ae08f8829cecd5e6ed7b sample-5017/BinData/BIN0002.jpg
e0f44117bf675d77297a86a322bd9eaa96543c37 sample-5017/BinData/BIN0002.png
e0f44117bf675d77297a86a322bd9eaa96543c37 sample-5017/BinData/BIN0003.png
Expand All @@ -447,19 +448,20 @@ unpack 명령
23302ee8ea7ddf4b1b7bfb8f6c307df589eeea4f sample-5017/PrvText
e40fe23054d2df479a06947174be594ff4c80497 sample-5017/Scripts/DefaultJScript
3da89ee273be13437e7ecf760f3fbd4dc0e8d1fe sample-5017/Scripts/JScriptVersion
25233fb7d96f387fbe07eadae65c7ba3cdccaab1 sample-5017/_05HwpSummaryInformation

$ rm -rf sample-5017
$ hwp5proc unpack --vstreams samples/sample-5017.hwp
$ find sample-5017 -type f | sort
$ find sample-5017 -type f | sort --dictionary
sample-5017/_05HwpSummaryInformation
sample-5017/_05HwpSummaryInformation.txt
sample-5017/BinData/BIN0002.jpg
sample-5017/BinData/BIN0002.png
sample-5017/BinData/BIN0003.png
sample-5017/BodyText.xml
sample-5017/BodyText/Section0
sample-5017/BodyText/Section0.models
sample-5017/BodyText/Section0.records
sample-5017/BodyText/Section0.xml
sample-5017/BodyText.xml
sample-5017/DocInfo
sample-5017/DocInfo.models
sample-5017/DocInfo.records
Expand All @@ -472,8 +474,6 @@ unpack 명령
sample-5017/PrvText.utf8
sample-5017/Scripts/DefaultJScript
sample-5017/Scripts/JScriptVersion
sample-5017/_05HwpSummaryInformation
sample-5017/_05HwpSummaryInformation.txt

records 명령
------------
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ babel
check-manifest
coloredlogs
flake8
jip
jupyter
lxml
pip-tools >= 1.9.0
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ipython-genutils==0.2.0 # via nbformat, notebook, qtconsole, traitlets
ipython==5.4.1 # via ipykernel, ipywidgets, jupyter-console
ipywidgets==7.0.0 # via jupyter
jinja2==2.9.6 # via nbconvert, notebook, sphinx
jip==0.9.13
jsonschema==2.6.0 # via nbformat
jupyter-client==5.1.0 # via ipykernel, jupyter-console, notebook, qtconsole
jupyter-console==5.2.0 # via jupyter
Expand Down Expand Up @@ -74,7 +75,7 @@ qtconsole==4.3.1
readme-renderer==17.2 # via restview
repoze.sphinx.autointerface==0.8
requests-toolbelt==0.8.0 # via twine
requests==2.18.4 # via requests-toolbelt, sphinx, twine
requests==2.18.4 # via jip, requests-toolbelt, sphinx, twine
restview==2.7.0
scandir==1.5 # via pathlib2
simplegeneric==0.8.1 # via ipython
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ changedir = {envdir}
commands =
zope-testrunner -vv --color --path={toxinidir}/pyhwp-tests --test-path={toxinidir}/pyhwp-tests --tests-pattern='^hwp5_tests$'
ln -sf {toxinidir}/samples
{toxinidir}/bin/clitest --prefix 3 {toxinidir}/pyhwp-tests/cli_tests/hwp5proc.txt
{toxinidir}/bin/clitest --prefix 3 {toxinidir}/pyhwp-tests/cli_tests/hwp5odt.txt
{toxinidir}/bin/clitest --prefix 3 {toxinidir}/pyhwp-tests/cli_tests/hwp5proc.txt {toxinidir}/pyhwp-tests/cli_tests/hwp5odt.txt
whitelist_externals =
ln

Expand All @@ -20,7 +19,7 @@ deps =
-r{toxinidir}/requirements-test.txt

[testenv:jy27]
basepython = jython2.7
basepython = {toxinidir}/parts/jython2.7/bin/jython
deps =
-r{toxinidir}/requirements-test.txt

Expand Down

0 comments on commit 5e36f3f

Please sign in to comment.