Merge pull request #370 from whipper-team/task/issue-337-use-scm-version
Use git to get whipper's version
This commit is contained in:
@@ -11,7 +11,7 @@ install:
|
|||||||
- sudo apt-get -qq update
|
- sudo apt-get -qq update
|
||||||
- sudo pip install --upgrade -qq pip
|
- sudo pip install --upgrade -qq pip
|
||||||
- sudo apt-get -qq install cdparanoia cdrdao flac gir1.2-glib-2.0 libcdio-dev libiso9660-dev libsndfile1-dev python-cddb python-gi python-musicbrainzngs python-mutagen python-setuptools sox swig libcdio-utils
|
- sudo apt-get -qq install cdparanoia cdrdao flac gir1.2-glib-2.0 libcdio-dev libiso9660-dev libsndfile1-dev python-cddb python-gi python-musicbrainzngs python-mutagen python-setuptools sox swig libcdio-utils
|
||||||
- sudo pip install pycdio==0.21 requests
|
- sudo pip install pycdio==0.21 requests setuptools_scm
|
||||||
|
|
||||||
# Testing dependencies
|
# Testing dependencies
|
||||||
- sudo apt-get -qq install python-twisted-core
|
- sudo apt-get -qq install python-twisted-core
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ mutagen
|
|||||||
pycdio>0.20
|
pycdio>0.20
|
||||||
PyGObject
|
PyGObject
|
||||||
requests
|
requests
|
||||||
|
setuptools_scm
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -1,15 +1,15 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from whipper import __version__ as whipper_version
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="whipper",
|
name="whipper",
|
||||||
version=whipper_version,
|
use_scm_version=True,
|
||||||
description="a secure cd ripper preferring accuracy over speed",
|
description="a secure cd ripper preferring accuracy over speed",
|
||||||
author=['Thomas Vander Stichele', 'The Whipper Team'],
|
author=['Thomas Vander Stichele', 'The Whipper Team'],
|
||||||
maintainer=['The Whipper Team'],
|
maintainer=['The Whipper Team'],
|
||||||
url='https://github.com/whipper-team/whipper',
|
url='https://github.com/whipper-team/whipper',
|
||||||
license='GPL3',
|
license='GPL3',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
|
setup_requires=['setuptools_scm'],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'whipper = whipper.command.main:main'
|
'whipper = whipper.command.main:main'
|
||||||
|
|||||||
@@ -2,7 +2,14 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
__version__ = '0.7.3'
|
from pkg_resources import (get_distribution,
|
||||||
|
DistributionNotFound, RequirementParseError)
|
||||||
|
try:
|
||||||
|
__version__ = get_distribution(__name__).version
|
||||||
|
except (DistributionNotFound, RequirementParseError):
|
||||||
|
# not installed as package or is being run from source/git checkout
|
||||||
|
from setuptools_scm import get_version
|
||||||
|
__version__ = get_version()
|
||||||
|
|
||||||
level = logging.INFO
|
level = logging.INFO
|
||||||
if 'WHIPPER_DEBUG' in os.environ:
|
if 'WHIPPER_DEBUG' in os.environ:
|
||||||
|
|||||||
Reference in New Issue
Block a user