From 4cacf86c8dfa32c97b87d5b2f1c1584e38bbdb8c Mon Sep 17 00:00:00 2001 From: Allan Galarza Date: Tue, 25 Sep 2018 09:46:16 -0700 Subject: [PATCH 1/3] Preparation for pypi - Added readme as long_description - Added version 1.0.0 - Added some classifiers - Added python .gitignore file - See #5 --- .gitignore | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ MANIFEST.in | 1 + README.md | 48 +++++++++++++---------- setup.py | 18 ++++++++- 4 files changed, 153 insertions(+), 22 deletions(-) create mode 100644 .gitignore create mode 100644 MANIFEST.in diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f6b651 --- /dev/null +++ b/.gitignore @@ -0,0 +1,108 @@ +# IDE user files +.idea/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..4bf4483 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include README.md \ No newline at end of file diff --git a/README.md b/README.md index 12a915e..c87b0ac 100644 --- a/README.md +++ b/README.md @@ -12,41 +12,47 @@ Copyright 2013 - [Helder Correia](http://heldercorreia.com) (GPL2) -------------------------------------------- Example – this source: +```markdown +Bla bla bla - Bla bla bla +![this is the caption](http://lorempixel.com/400/200/) - ![this is the caption](http://lorempixel.com/400/200/) - - Next paragraph starts here +Next paragraph starts here +``` + would generate this: -

Bla bla bla

- -
- -
this is the caption
-
- -

Next paragraph starts here

+```html +

Bla bla bla

+
+ +
this is the caption
+
+ +

Next paragraph starts here

+``` It can also handle images that use references and/or titles : - Some really good writing. +```markdown +Some really good writing. - ![Description of something cool.][ref1] +![Description of something cool.][ref1] - More great writing. +More great writing. - [ref1]: http://lorempixel.com/400/200/ "A title for the cool image." +[ref1]: http://lorempixel.com/400/200/ "A title for the cool image." +``` would generate this: +```html +

Some really good writing.

-

Some really good writing.

- -
Description of something cool.
Description of something cool.
-
+
Description of something cool.
Description of something cool.
+
-

More great writing.

\ No newline at end of file +

More great writing.

+``` \ No newline at end of file diff --git a/setup.py b/setup.py index 9ffbccd..b42b04b 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,26 @@ from setuptools import setup +with open('README.md') as f: + readme = f.read() + setup( name='figureAltCaption', + version='1.0.0', description='Extension for Python-Markdown to parse images with captions.', + long_description=readme, + long_description_content_type="text/markdown", url='https://github.com/jdittrich/figureAltCaption', py_modules=['figureAltCaption'], - install_requires=['Markdown>=2.0',], + install_requires=['Markdown>=2.0', ], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Plugins', + 'Intended Audience :: Developers', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Topic :: Documentation', + 'Topic :: Text Processing :: Markup', + 'Topic :: Utilities' + ] ) From 0a60b342009ebad7b4388054ba08f33612f552d9 Mon Sep 17 00:00:00 2001 From: Allan Galarza Date: Tue, 25 Sep 2018 09:50:36 -0700 Subject: [PATCH 2/3] Added Markdown version upper limit --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b42b04b..491634a 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ long_description_content_type="text/markdown", url='https://github.com/jdittrich/figureAltCaption', py_modules=['figureAltCaption'], - install_requires=['Markdown>=2.0', ], + install_requires=['Markdown>=2.0,<3.0', ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', From 3fe809d8fa0d67d71aabe4da135501b898b0f48a Mon Sep 17 00:00:00 2001 From: Allan Galarza Date: Tue, 25 Sep 2018 11:22:23 -0700 Subject: [PATCH 3/3] Added license --- MANIFEST.in | 3 ++- setup.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 4bf4483..8bbac01 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ -include README.md \ No newline at end of file +include README.md +include LICENSE.md \ No newline at end of file diff --git a/setup.py b/setup.py index 491634a..b99627e 100644 --- a/setup.py +++ b/setup.py @@ -18,6 +18,7 @@ 'Development Status :: 5 - Production/Stable', 'Environment :: Plugins', 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Documentation',