mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add a version option.
This commit is contained in:
parent
7570728289
commit
ccf53ceb04
2 changed files with 6 additions and 1 deletions
|
|
@ -7,6 +7,8 @@ from pelican.writers import Writer
|
||||||
from pelican.generators import (ArticlesGenerator, PagesGenerator,
|
from pelican.generators import (ArticlesGenerator, PagesGenerator,
|
||||||
StaticGenerator, PdfGenerator)
|
StaticGenerator, PdfGenerator)
|
||||||
|
|
||||||
|
VERSION = "2.5.1"
|
||||||
|
|
||||||
|
|
||||||
def init_params(settings=None, path=None, theme=None, output_path=None,
|
def init_params(settings=None, path=None, theme=None, output_path=None,
|
||||||
markup=None, keep=False):
|
markup=None, keep=False):
|
||||||
|
|
@ -99,6 +101,8 @@ def main():
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Keep the output directory and just update all the generated files.'
|
help='Keep the output directory and just update all the generated files.'
|
||||||
'Default is to delete the output directory.')
|
'Default is to delete the output directory.')
|
||||||
|
parser.add_argument('--version', action='version', version=VERSION,
|
||||||
|
help="Print the pelican version and exit")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Split the markup languages only if some have been given. Otherwise, populate
|
# Split the markup languages only if some have been given. Otherwise, populate
|
||||||
|
|
|
||||||
3
setup.py
3
setup.py
|
|
@ -1,4 +1,5 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
from pelican import VERSION
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
requires = ['feedgenerator', 'jinja2', 'pygments', 'docutils', 'Markdown']
|
requires = ['feedgenerator', 'jinja2', 'pygments', 'docutils', 'Markdown']
|
||||||
|
|
@ -7,7 +8,7 @@ if sys.version_info < (2,7):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = "pelican",
|
name = "pelican",
|
||||||
version = '2.5.1',
|
version = VERSION,
|
||||||
url = 'http://alexis.notmyidea.org/pelican/',
|
url = 'http://alexis.notmyidea.org/pelican/',
|
||||||
author = 'Alexis Metaireau',
|
author = 'Alexis Metaireau',
|
||||||
author_email = 'alexis@notmyidea.org',
|
author_email = 'alexis@notmyidea.org',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue