Skip to content

Commit 954da0b

Browse files
committed
Updated version to 0.1.1
1 parent 24d05d7 commit 954da0b

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed

crossplane/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
# -*- coding: utf-8 -*-
22
from .parser import parse
33
from .lexer import lex
4+
45
__all__ = ['parse', 'lex']
6+
7+
__title__ = 'crossplane'
8+
__summary__ = 'Reliable and fast NGINX configuration file parser.'
9+
__url__ = 'https://github.com/nginxinc/crossplane'
10+
11+
__version__ = '0.1.1'
12+
13+
__author__ = 'Arie van Luttikhuizen'
14+
__email__ = '[email protected]'
15+
16+
__license__ = 'Apache License, Version 2.0'
17+
__copyright__ = 'Copyright 2017 NGINX, Inc.'

setup.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,24 @@
22
# -*- coding: utf-8 -*-
33
from __future__ import print_function
44

5-
# Note: To use the 'upload' functionality of this file, you must:
6-
# $ pip install twine
7-
5+
import io
86
import os
7+
import shutil
98
import sys
109

11-
from shutil import rmtree
12-
from codecs import open
13-
from setuptools import find_packages, setup, Command
10+
from setuptools import setup, Command
11+
12+
from crossplane import (
13+
__title__, __summary__, __url__, __version__, __author__, __email__,
14+
__package__, __license__
15+
)
16+
1417

15-
here = os.path.abspath(os.path.dirname(__file__))
16-
path = os.path.join(here, 'README.rst')
17-
with open(path, encoding='utf-8') as f:
18-
readme = '\n' + f.read()
18+
def get_readme():
19+
here = os.path.abspath(os.path.dirname(__file__))
20+
path = os.path.join(here, 'README.rst')
21+
with io.open(path, encoding='utf-8') as f:
22+
return '\n' + f.read()
1923

2024

2125
class UploadCommand(Command):
@@ -38,29 +42,29 @@ def finalize_options(self):
3842
def run(self):
3943
try:
4044
self.status('Removing previous builds…')
41-
rmtree(os.path.join(here, 'dist'))
45+
shutil.rmtree(os.path.join(here, 'dist'))
4246
except OSError:
4347
pass
4448

4549
self.status('Building Source and Wheel (universal) distribution…')
4650
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
4751

48-
self.status('Uploading the package to PyPi via Twine…')
52+
self.status('Uploading the package to PyPI via Twine…')
4953
os.system('twine upload dist/*')
5054

5155
sys.exit()
5256

5357

5458
setup(
55-
name='crossplane',
56-
version='0.1.0',
57-
description='Reliable and fast NGINX configuration file parser.',
58-
long_description=readme,
59-
author='Arie van Luttikhuizen',
60-
author_email='[email protected]',
61-
url='https://github.com/nginxinc/crossplane',
62-
packages=find_packages(exclude=['tests']),
63-
license='Apache 2.0',
59+
name=__title__,
60+
version=__version__,
61+
description=__summary__,
62+
long_description=get_readme(),
63+
author=__author__,
64+
author_email=__email__,
65+
url=__url__,
66+
packages=[__package__],
67+
license=__license__,
6468
classifiers=[
6569
'Development Status :: 3 - Alpha',
6670
'Intended Audience :: Developers',
@@ -83,7 +87,5 @@ def run(self):
8387
'crossplane = crossplane.__main__:main'
8488
],
8589
},
86-
cmdclass={
87-
'upload': UploadCommand # setup.py publish support
88-
}
90+
cmdclass={'upload': UploadCommand}
8991
)

0 commit comments

Comments
 (0)