Browse Source

Convert yml2 into a Python package.

* Rename yml2.py    -> yml2/__init__.py
* Rename backend.py -> yml2/backend.py
* Rename pyPEG.py   -> yml2/pyPEG.py
* Use relative imports where appropriate.
* Change imports in yml2c, yml2proc.
* Update make target `clean`.
Hartmut Goebel 2 years ago
parent
commit
d589862910
6 changed files with 10 additions and 10 deletions
  1. +3
    -3
      Makefile
  2. +1
    -1
      yml2/__init__.py
  3. +2
    -2
      yml2/backend.py
  4. +0
    -0
      yml2/pyPEG.py
  5. +2
    -2
      yml2c
  6. +2
    -2
      yml2proc

+ 3
- 3
Makefile View File

@ -10,11 +10,11 @@ update: homepage format.css gpl-2.0.txt
update-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
if test -z $(VERSION) ; then echo VERSION not set ; exit 1 ; fi
rsync -avC *.py yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
ssh dragon bash -c "cd ; cd fdik.org/; tar cvjf yml-$(VERSION).tar.bz2 yml2/{*.py,*.yml2,*.yhtml2,format.css,gpl-2.0.txt,yml2c,Makefile,yml2proc,xml2yml.ysl2,standardlib.ysl2,samples} ; rm yml2.tar.bz2 ; ln -s yml-$(VERSION).tar.bz2 yml2.tar.bz2"
rsync -avC *.py yml2 yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
ssh dragon bash -c "cd ; cd fdik.org/; tar cvjf yml-$(VERSION).tar.bz2 yml2/{*.py,*.yml2,*.yhtml2,format.css,gpl-2.0.txt,yml2,yml2c,Makefile,yml2proc,xml2yml.ysl2,standardlib.ysl2,samples} ; rm yml2.tar.bz2 ; ln -s yml-$(VERSION).tar.bz2 yml2.tar.bz2"
%.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
$(YML2C) $< -o $@
clean:
rm -f *.html *.pyc *.pyo
rm -f *.html *.pyc *.pyo */*.pyc */*.pyo

yml2.py → yml2/__init__.py View File


backend.py → yml2/backend.py View File


pyPEG.py → yml2/pyPEG.py View File


+ 2
- 2
yml2c View File

@ -11,9 +11,9 @@ import sys, os, codecs, locale
import fileinput, unicodedata
from optparse import OptionParser
from pyPEG import parse, u
from yml2.pyPEG import parse, u
from yml2 import ymlCStyle, comment, oldSyntax
import backend
import yml2.backend as backend
def printInfo(option, opt_str, value, parser):
sys.stdout.write(__doc__)


+ 2
- 2
yml2proc View File

@ -18,8 +18,8 @@ except:
sys.exit(1)
from yml2 import ymlCStyle, comment, oldSyntax
from pyPEG import parse, u
import backend
from yml2.pyPEG import parse, u
import yml2.backend as backend
def printInfo(option, opt_str, value, parser):
sys.stdout.write(__doc__)


Loading…
Cancel
Save