Skip to content

Commit 4b80174

Browse files
committed
store version in setup.py
update requirements
1 parent c5d36ce commit 4b80174

8 files changed

Lines changed: 16 additions & 17 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include requirements.txt AUTHORS.rst LICENSE.rst
2-
recursive-include docs *
2+
graft docs
33
prune docs/_build
44
recursive-include sopy/migrations *.py
55
graft sopy/static

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from datetime import datetime
12
from sopy import __version__
23

34
# -- General configuration ------------------------------------------------
@@ -19,14 +20,14 @@
1920

2021
# General information about the project.
2122
project = 'sopython-site'
22-
copyright = '2014, sopython organization'
23+
copyright = '2014 - {}, sopython organization'.format(datetime.utcnow().year)
2324

2425
# The version info for the project you're documenting, acts as replacement for
2526
# |version| and |release|, also used in various other places throughout the
2627
# built documents.
2728
#
2829
# The short X.Y version.
29-
version = __version__
30+
version = '.'.join(__version__.split('.')[:2])
3031
# The full version, including alpha/beta/rc tags.
3132
release = version
3233

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
alembic==0.7.7
22
beautifulsoup4==4.4.1
3-
Flask==0.11.dev0
3+
Flask==0.11
44
Flask-Alembic==1.2.1
5-
Flask-Babel==0.9
5+
Flask-Babel==0.11.0
66
Flask-Mail==0.9.1
77
Flask-SQLAlchemy==2.1
88
Flask-WTF==0.12
@@ -13,6 +13,6 @@ lxml==3.6.0
1313
psycopg2==2.6.1
1414
Pygments==2.1.3
1515
requests==2.10.0
16-
SQLAlchemy==1.0.12
17-
Werkzeug==0.11.9
16+
SQLAlchemy==1.0.13
17+
Werkzeug==0.11.10
1818
WTForms==2.1

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[egg_info]
2-
tag_build = .dev0
2+
tag_build = .dev
3+
tag_date = 1
34

45
[aliases]
56
release = egg_info -RDb ''

setup.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#!/usr/bin/env python
2-
import os
3-
import re
42
from setuptools import setup, find_packages
53

6-
with open(os.path.join(os.path.dirname(__file__), 'sopy', '__init__.py')) as f:
7-
version = re.search(r"__version__ = '(.*)'", f.read()).group(1)
8-
94
with open('requirements.txt') as f:
105
requirements = f.read().splitlines()
116

127
setup(
138
name='sopy',
14-
version=version,
9+
version='1.6',
1510
packages=find_packages(),
1611
include_package_data=True,
1712
url='http://sopython.com/',

sopy/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
import logging
22

33
import sys
4+
5+
import pkg_resources
46
from flask import Flask
57
from flask import render_template
68
from flask_alembic import Alembic
79
from flask_alembic.cli.click import cli as alembic_cli
810
from flask_babel import Babel
911
from sopy.ext.sqlalchemy import SQLAlchemy
1012

11-
__version__ = '1.5.2'
13+
__version__ = pkg_resources.get_distribution('sopy').version
1214

1315
alembic = Alembic()
1416
babel = Babel()
1517
db = SQLAlchemy()
1618

1719

18-
def create_app(info=None):
20+
def create_app():
1921
app = Flask(__name__, instance_relative_config=True)
20-
app.config.from_object('sopy.config.defaults')
22+
app.config.from_object('sopy.config')
2123
app.config.from_pyfile('config.py', True)
2224

2325
app.cli.add_command(alembic_cli, 'db')
File renamed without changes.

sopy/config/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)