Skip to content

Commit

Permalink
Fix installator and ns issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hlef committed Apr 28, 2018
1 parent 759444e commit bf2d3b5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
8 changes: 2 additions & 6 deletions juliet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
__version__ = '0.1-final'
__author__ = 'Hugo Lefeuvre'
__author_email__ = 'hle@owl.eu.com'

import argparse, logging, os, slugify, datetime, sys
from juliet import configurator, loader, paths, defaults
from juliet import configurator, loader, paths, defaults, version
from juliet.builder import Builder

def main():
Expand Down Expand Up @@ -86,7 +82,7 @@ def parse_arguments(args):
parent_parser = argparse.ArgumentParser(add_help=False)
parent_parser.add_argument('--debug', '-d', action='count', default=0)
parent_parser.add_argument('--version', action='version',
version='%(prog)s {version}'.format(version=__version__))
version='%(prog)s {version}'.format(version=version.__version__))

main_parser = argparse.ArgumentParser(parents=[parent_parser],
description='The lightweight static website generator')
Expand Down
6 changes: 6 additions & 0 deletions juliet/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__version__ = '0.1-final'
__author__ = 'Hugo Lefeuvre'
__author_email__ = 'hle@owl.eu.com'
__license__ = 'MIT'
__description__ = 'The lightweight static website generator'
__url__ = 'http://github.com/hlef/juliet'
36 changes: 20 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
#!/usr/bin/python3

from setuptools import setup
import juliet
from distutils.util import convert_path
import os

setup(name='juliet',
version=juliet.__version__,
description='The lightweight static website generator',
url='http://github.com/hlef/juliet',
author=juliet.__author__,
author_email=juliet.__author_email__,
license='MIT',
packages=['juliet'],
entry_points={
'console_scripts': [
'juliet = juliet:main'
]
},
name = 'juliet'
packages = ['juliet']
requires = ['jinja2>=2.7', 'pygments', 'pyyaml>=3.11', 'markdown', 'python-slugify']

main_ns = {}
with open(convert_path(os.path.join(packages[0], 'version.py'))) as ver_file:
exec(ver_file.read(), main_ns)

setup(name=name,
version=main_ns['__version__'],
description=main_ns['__description__'],
url=main_ns['__url__'],
author=main_ns['__author__'],
author_email=main_ns['__author_email__'],
license=main_ns['__license__'],
packages=packages,
entry_points={'console_scripts': ['juliet = juliet:main']},
zip_safe=False,
install_requires = ['jinja2>=2.7', 'pygments', 'pyyaml>=3.11', 'markdown',
'python-slugify'],
install_requires = requires,
test_suite='nose.collector',
tests_require=['nose'])

0 comments on commit bf2d3b5

Please sign in to comment.