forked from josch/img2pdf
add --version option and __version__ module variable and use ~git version suffix
This commit is contained in:
parent
d5fc324b7b
commit
36fb9173fe
2 changed files with 9 additions and 2 deletions
6
setup.py
6
setup.py
|
@ -1,8 +1,10 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
VERSION="0.1.6~git"
|
||||||
|
|
||||||
setup (
|
setup (
|
||||||
name='img2pdf',
|
name='img2pdf',
|
||||||
version='0.1.5',
|
version=VERSION,
|
||||||
author = "Johannes 'josch' Schauer",
|
author = "Johannes 'josch' Schauer",
|
||||||
author_email = 'j.schauer@email.de',
|
author_email = 'j.schauer@email.de',
|
||||||
description = "Convert images to PDF via direct JPEG inclusion.",
|
description = "Convert images to PDF via direct JPEG inclusion.",
|
||||||
|
@ -24,7 +26,7 @@ setup (
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
'Operating System :: OS Independent'],
|
'Operating System :: OS Independent'],
|
||||||
url = 'https://github.com/josch/img2pdf',
|
url = 'https://github.com/josch/img2pdf',
|
||||||
download_url = 'https://github.com/josch/img2pdf/archive/0.1.5.tar.gz',
|
download_url = 'https://github.com/josch/img2pdf/archive/'+VERSION+'.tar.gz',
|
||||||
package_dir={"": "src"},
|
package_dir={"": "src"},
|
||||||
py_modules=['img2pdf', 'jp2'],
|
py_modules=['img2pdf', 'jp2'],
|
||||||
include_package_data = True,
|
include_package_data = True,
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
# License along with this program. If not, see
|
# License along with this program. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
__version__ = "0.1.6~git"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import zlib
|
import zlib
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -410,6 +412,9 @@ parser.add_argument(
|
||||||
'-D', '--nodate', help='do not add timestamps', action="store_true")
|
'-D', '--nodate', help='do not add timestamps', action="store_true")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-v', '--verbose', help='verbose mode', action="store_true")
|
'-v', '--verbose', help='verbose mode', action="store_true")
|
||||||
|
parser.add_argument(
|
||||||
|
'-V', '--version', action='version', version='%(prog)s '+__version__,
|
||||||
|
help="Print version information and exit")
|
||||||
|
|
||||||
def main(args=None):
|
def main(args=None):
|
||||||
if args is None:
|
if args is None:
|
||||||
|
|
Loading…
Reference in a new issue