mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Back out single-source version number changes. Not worth the head aches.
This commit is contained in:
@@ -32,9 +32,6 @@ except NameError:
|
||||
# The class that all Interface Action plugin wrappers must inherit from
|
||||
from calibre.customize import InterfaceActionBase
|
||||
|
||||
## single sourcing version number in fanficfare/__init__.py
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare import __version_num__
|
||||
|
||||
## Apparently the name for this class doesn't matter--it was still
|
||||
## 'demo' for the first few versions.
|
||||
class FanFicFareBase(InterfaceActionBase):
|
||||
@@ -51,7 +48,7 @@ class FanFicFareBase(InterfaceActionBase):
|
||||
description = _('UI plugin to download FanFiction stories from various sites.')
|
||||
supported_platforms = ['windows', 'osx', 'linux']
|
||||
author = 'Jim Miller'
|
||||
version = __version_num__
|
||||
version = (2, 3, 6)
|
||||
minimum_calibre_version = (1, 48, 0)
|
||||
|
||||
#: This field defines the GUI plugin class that contains all the code
|
||||
@@ -135,6 +132,7 @@ class FanFicFareBase(InterfaceActionBase):
|
||||
read_only=True))
|
||||
|
||||
fff_main(argv[1:],
|
||||
parser=parser,
|
||||
passed_defaultsini=StringIO(get_resources("fanficfare/defaults.ini")),
|
||||
passed_personalini=StringIO(fff_prefs["personal.ini"]))
|
||||
parser=parser,
|
||||
passed_defaultsini=StringIO(get_resources("fanficfare/defaults.ini")),
|
||||
passed_personalini=StringIO(fff_prefs["personal.ini"]),
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2015 Fanficdownloader team, 2015 FanFicFare team
|
||||
# Copyright 2015 Fanficdownloader team, 2016 FanFicFare team
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -31,9 +31,3 @@ except:
|
||||
logger.addHandler(loghandler)
|
||||
loghandler.setLevel(logging.DEBUG)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
## single sourcing version number in fanficfare/__init__.py
|
||||
## __version_num__ for calibre plugin
|
||||
## __version__ moved from ../setup.py so cli.py can also display it.
|
||||
__version_num__ = (2, 3, 6)
|
||||
__version__ = ".".join([unicode(x) for x in __version_num__])
|
||||
|
||||
+9
-7
@@ -26,6 +26,8 @@ import pprint
|
||||
import string
|
||||
import sys
|
||||
|
||||
version="2.3.6"
|
||||
|
||||
if sys.version_info < (2, 5):
|
||||
print 'This program requires Python 2.5 or newer.'
|
||||
sys.exit(1)
|
||||
@@ -39,13 +41,13 @@ if sys.version_info >= (2, 7):
|
||||
|
||||
try:
|
||||
# running under calibre
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare import adapters, writers, exceptions, __version__
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare import adapters, writers, exceptions
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare.configurable import Configuration
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare.epubutils import (
|
||||
get_dcsource_chaptercount, get_update_data, reset_orig_chapters_epub)
|
||||
from calibre_plugins.fanficfare_plugin.fanficfare.geturls import get_urls_from_page, get_urls_from_imap
|
||||
except ImportError:
|
||||
from fanficfare import adapters, writers, exceptions, __version__
|
||||
from fanficfare import adapters, writers, exceptions
|
||||
from fanficfare.configurable import Configuration
|
||||
from fanficfare.epubutils import (
|
||||
get_dcsource_chaptercount, get_update_data, reset_orig_chapters_epub)
|
||||
@@ -59,9 +61,10 @@ def write_story(config, adapter, writeformat, metaonly=False, outstream=None):
|
||||
del writer
|
||||
return output_filename
|
||||
|
||||
configuration = None
|
||||
|
||||
def main(argv=None, parser=None, passed_defaultsini=None, passed_personalini=None):
|
||||
def main(argv=None,
|
||||
parser=None,
|
||||
passed_defaultsini=None,
|
||||
passed_personalini=None):
|
||||
if argv is None:
|
||||
argv = sys.argv[1:]
|
||||
# read in args, anything starting with -- will be treated as --<varible>=<value>
|
||||
@@ -139,8 +142,7 @@ def main(argv=None, parser=None, passed_defaultsini=None, passed_personalini=Non
|
||||
# print args
|
||||
|
||||
if options.version:
|
||||
## single sourcing version number in fanficfare/__init__.py
|
||||
print("Version: %s" % __version__)
|
||||
print("Version: %s" % version)
|
||||
return
|
||||
|
||||
if not options.debug:
|
||||
|
||||
@@ -16,16 +16,12 @@ from os import path
|
||||
# Get the long description from the relevant file
|
||||
with codecs.open('DESCRIPTION.rst', encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
|
||||
from fanficfare import __version__
|
||||
|
||||
setup(
|
||||
name="FanFicFare",
|
||||
|
||||
# Versions should comply with PEP440. For a discussion on single-sourcing
|
||||
# the version across setup.py and the project code, see
|
||||
# https://packaging.python.org/en/latest/single_source_version.html
|
||||
version=__version__,
|
||||
# Versions should comply with PEP440.
|
||||
version="2.3.6",
|
||||
|
||||
description='A tool for downloading fanfiction to eBook formats',
|
||||
long_description=long_description,
|
||||
|
||||
Reference in New Issue
Block a user