Skip to content

Commit

Permalink
Versioning implemented in command line.
Browse files Browse the repository at this point in the history
  • Loading branch information
danilop committed Feb 26, 2014
1 parent c4c9666 commit b3b850c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ To unmount the file system on a Mac you can use `umount`.
-l FILE, --log FILE filename for logs
-f, --foreground run in foreground
-d, --debug show debug info
-V, --version show program's version number and exit

### Notification Syntax & Use

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
from setuptools import setup
import sys

execfile('yas3fs/_version.py')

# Versions of Python pre-2.7 require argparse separately. 2.7+ and 3+ all
# include this as the replacement for optparse.
if sys.version_info[:2] < (2, 7):
install_requires.append("argparse")

setup(
name='yas3fs',
version='2.1.1',
version=__version__,
description='YAS3FS (Yet Another S3-backed File System) is a Filesystem in Userspace (FUSE) interface to Amazon S3.',
packages=['yas3fs'],
author='Danilo Poccia',
Expand Down
3 changes: 3 additions & 0 deletions yas3fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

from fuse import FUSE, FuseOSError, Operations, LoggingMixIn, fuse_get_context

from _version import __version__

class Interval():
""" Simple integer interval arthmetic."""
def __init__(self):
Expand Down Expand Up @@ -2258,6 +2260,7 @@ def main():
help='run in foreground')
parser.add_argument('-d', '--debug', action='store_true',
help='show debug info')
parser.add_argument('-V', '--version', action='version', version='%(prog)s {version}'.format(version=__version__))

options = parser.parse_args()

Expand Down
1 change: 1 addition & 0 deletions yas3fs/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '2.1.2'

0 comments on commit b3b850c

Please sign in to comment.