Commit 174a7250 authored by Ramon Buldó's avatar Ramon Buldó

Minor pep8 fixes, consolidate version in one place

parent 39d80bc3
......@@ -31,7 +31,7 @@ project_root = os.path.dirname(cwd)
# version is used.
sys.path.insert(0, project_root)
import pacman-mirrors
import pacman_mirrors
# -- General configuration ---------------------------------------------
......@@ -63,9 +63,9 @@ copyright = u'2015, Ramon Buldó'
# the built documents.
#
# The short X.Y version.
version = pacman-mirrors.__version__
version = pacman_mirrors.__version__
# The full version, including alpha/beta/rc tags.
release = pacman-mirrors.__version__
release = pacman_mirrors.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -4,4 +4,4 @@ Usage
To use pacman-mirrors in a project::
import pacman-mirrors
import pacman_mirrors
__author__ = "Roland Singer, Esclapion, philm and Ramon Buldó"
__version__ = "20150808"
__version__ = "3.0.0"
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import glob
import io
import re
import os
from setuptools import setup
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
with open('README.rst') as readme_file:
readme = readme_file.read()
......@@ -22,7 +43,7 @@ mirror_files = glob.glob('data/mirrors/*')
setup(
name='pacman-mirrors',
version='3.0',
version=find_version("pacman_mirrors", "__init__.py"),
description="Package that provides all mirrors for Manjaro Linux.",
long_description=readme + '\n\n' + history,
author="Roland Singer, Esclapion, philm, Ramon Buldó",
......@@ -67,6 +88,7 @@ setup(
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Environment :: Console'
],
test_suite='tests',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment