diff --git a/README.md b/README.md index a5e947a..497da53 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,6 @@ You can also use mdv as a **source code** viewer, best when you have docstrings from ```python -~/terminal_markdown_viewer $ cat setup.py #!/usr/bin/env python2.7 # coding: utf-8 @@ -92,7 +91,7 @@ from ## Usage - [sudo] ./setup.py install + pip install --upgrade . ---- """ diff --git a/mdv/misc/.test_md.md.swp b/mdv/misc/.test_md.md.swp deleted file mode 100644 index cf14695..0000000 Binary files a/mdv/misc/.test_md.md.swp and /dev/null differ diff --git a/mdv/misc/results_perftests/out_commonmark.html b/mdv/misc/results_perftests/out_commonmark.html index 89431b0..a846161 100644 --- a/mdv/misc/results_perftests/out_commonmark.html +++ b/mdv/misc/results_perftests/out_commonmark.html @@ -77,7 +77,7 @@

You can also use mdv as a source code viewer, best when you have docstrings with markdown in your code:

from

-
~/terminal_markdown_viewer $ cat setup.py
+

 #!/usr/bin/env python2.7
 # coding: utf-8
 
@@ -86,7 +86,7 @@
 
 ## Usage
 
-    [sudo] ./setup.py install
+    [sudo] pip install --upgrade .
 
 ----
 """
@@ -156,9 +156,9 @@ 

Manual Install: Setup

Distribution via setuptools. If setuptools is not installed, run:

pip install setuptools
 
-

Use the setup.py provided inside, I.e. run:

-
sudo ./setup.py install
-(or ./setup.py install --user to install only for the current user)
+

Use pip, I.e. run:

+
sudo pip install --upgrade .
+(or just pip install --upgrade . to install only for the current user)
 

Usage

CLI

@@ -448,4 +448,4 @@

Sept 2018:

| User | Any | | Campaign | Any | | Support Portal | [cpeid, '=', a cpeid] |

- \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_markdown.html b/mdv/misc/results_perftests/out_markdown.html index 3b84c04..835cbc5 100644 --- a/mdv/misc/results_perftests/out_markdown.html +++ b/mdv/misc/results_perftests/out_markdown.html @@ -78,7 +78,7 @@

You can also use mdv as a source code viewer, best when you have docstrings with markdown in your code:

from

-
~/terminal_markdown_viewer $ cat setup.py
+

 #!/usr/bin/env python2.7
 # coding: utf-8
 
@@ -87,7 +87,7 @@
 
 ## Usage
 
-    [sudo] ./setup.py install
+    [sudo] pip install --upgrade .
 
 ----
 """
@@ -157,9 +157,9 @@ 

Manual Install: Setup

Distribution via setuptools. If setuptools is not installed, run:

pip install setuptools
 
-

Use the setup.py provided inside, I.e. run:

-
sudo ./setup.py install
-(or ./setup.py install --user to install only for the current user)
+

Use pip, I.e. run:

+
sudo pip install --upgrade .
+(or just pip install --upgrade . to install only for the current user)
 

Usage

CLI

@@ -471,4 +471,4 @@

Sept 2018:

[cpeid, '=', a cpeid] - \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_mistletoe.html b/mdv/misc/results_perftests/out_mistletoe.html index 8cac986..7d97462 100644 --- a/mdv/misc/results_perftests/out_mistletoe.html +++ b/mdv/misc/results_perftests/out_mistletoe.html @@ -77,7 +77,7 @@

You can also use mdv as a source code viewer, best when you have docstrings with markdown in your code:

from

-
~/terminal_markdown_viewer $ cat setup.py
+

 #!/usr/bin/env python2.7
 # coding: utf-8
 
@@ -86,7 +86,7 @@
 
 ## Usage
 
-    [sudo] ./setup.py install
+    [sudo] pip install --upgrade .
 
 ----
 """
@@ -173,9 +173,9 @@ 

Manual Install: Setup

Distribution via setuptools. If setuptools is not installed, run:

pip install setuptools
 
-

Use the setup.py provided inside, I.e. run:

-
sudo ./setup.py install
-(or ./setup.py install --user to install only for the current user)
+

Use pip, I.e. run:

+
sudo pip install --upgrade .
+(or just pip install --upgrade . to install only for the current user)
 

Usage

CLI

@@ -516,4 +516,4 @@

Sept 2018:

- \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_mistletoe_ansi.html b/mdv/misc/results_perftests/out_mistletoe_ansi.html index 49bf4aa..76add91 100644 --- a/mdv/misc/results_perftests/out_mistletoe_ansi.html +++ b/mdv/misc/results_perftests/out_mistletoe_ansi.html @@ -135,7 +135,6 @@ from \begin{lstlisting}[language=python] -~/terminal_markdown_viewer $ cat setup.py #!/usr/bin/env python2.7 # coding: utf-8 @@ -144,7 +143,7 @@ ## Usage - [sudo] ./setup.py install + [sudo] pip install --upgrade . ---- """ @@ -273,11 +272,11 @@ pip install setuptools \end{lstlisting} -Use the setup.py provided inside, I.e. run: +Use pip, I.e. run: \begin{lstlisting}[language=] -sudo ./setup.py install -(or ./setup.py install --user to install only for the current user) +sudo pip install --upgrade . +(or just pip install --upgrade . to install only for the current user) \end{lstlisting} \subsection{Usage} @@ -686,4 +685,4 @@ Support Portal & \verb|[cpeid, '=', a cpeid]| \end{tabular} \end{document} - \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_paka.html b/mdv/misc/results_perftests/out_paka.html index d84a5f6..a9dcc62 100644 --- a/mdv/misc/results_perftests/out_paka.html +++ b/mdv/misc/results_perftests/out_paka.html @@ -64,7 +64,7 @@

You can also use mdv as a source code viewer, best when you have docstrings with markdown in your code:

from

-
~/terminal_markdown_viewer $ cat setup.py
+

 #!/usr/bin/env python2.7
 # coding: utf-8
 
@@ -73,7 +73,7 @@
 
 ## Usage
 
-    [sudo] ./setup.py install
+    [sudo] pip install --upgrade .
 
 ----
 """
@@ -141,9 +141,9 @@ 

Manual Install: Setup

Distribution via setuptools. If setuptools is not installed, run:

pip install setuptools
 
-

Use the setup.py provided inside, I.e. run:

-
sudo ./setup.py install
-(or ./setup.py install --user to install only for the current user)
+

Use pip, I.e. run:

+
sudo pip install --upgrade .
+(or just pip install --upgrade . to install only for the current user)
 

Usage

CLI

@@ -422,4 +422,4 @@

Sept 2018:

tabletest

| Date | foo | |----------------|--------------------------| | User | Any | | Campaign | Any | | Support Portal | [cpeid, '=', a cpeid] |

- \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_paka_breaks.html b/mdv/misc/results_perftests/out_paka_breaks.html index e8fe2a6..f1cdb7d 100644 --- a/mdv/misc/results_perftests/out_paka_breaks.html +++ b/mdv/misc/results_perftests/out_paka_breaks.html @@ -77,7 +77,7 @@

You can also use mdv as a source code viewer, best when you have docstrings with markdown in your code:

from

-
~/terminal_markdown_viewer $ cat setup.py
+

 #!/usr/bin/env python2.7
 # coding: utf-8
 
@@ -86,7 +86,7 @@
 
 ## Usage
 
-    [sudo] ./setup.py install
+    [sudo] pip install --upgrade .
 
 ----
 """
@@ -156,9 +156,9 @@ 

Manual Install: Setup

Distribution via setuptools. If setuptools is not installed, run:

pip install setuptools
 
-

Use the setup.py provided inside, I.e. run:

-
sudo ./setup.py install
-(or ./setup.py install --user to install only for the current user)
+

Use pip, I.e. run:

+
sudo pip install --upgrade .
+(or just pip install --upgrade . to install only for the current user)
 

Usage

CLI

@@ -448,4 +448,4 @@

Sept 2018:

| User | Any |
| Campaign | Any |
| Support Portal | [cpeid, '=', a cpeid] |

- \ No newline at end of file + diff --git a/mdv/misc/results_perftests/out_paka_xml.html b/mdv/misc/results_perftests/out_paka_xml.html index 437b825..4400f65 100644 --- a/mdv/misc/results_perftests/out_paka_xml.html +++ b/mdv/misc/results_perftests/out_paka_xml.html @@ -209,7 +209,7 @@ from - ~/terminal_markdown_viewer $ cat setup.py + #!/usr/bin/env python2.7 # coding: utf-8 @@ -218,7 +218,7 @@ ## Usage - [sudo] ./setup.py install + [sudo] pip install --upgrade . ---- """ @@ -417,10 +417,10 @@ pip install setuptools - Use the setup.py provided inside, I.e. run: + Use pip, I.e. run: - sudo ./setup.py install -(or ./setup.py install --user to install only for the current user) + sudo pip install --upgrade . +(or just pip install --upgrade . to install only for the current user) Usage @@ -985,4 +985,4 @@ | - \ No newline at end of file + diff --git a/mdv/misc/test_md.md b/mdv/misc/test_md.md index fbc5a93..900a2d4 100644 --- a/mdv/misc/test_md.md +++ b/mdv/misc/test_md.md @@ -90,7 +90,6 @@ You can also use mdv as a **source code** viewer, best when you have docstrings from ```python -~/terminal_markdown_viewer $ cat setup.py #!/usr/bin/env python2.7 # coding: utf-8 @@ -99,7 +98,7 @@ from ## Usage - [sudo] ./setup.py install + [sudo] pip install --upgrade . ---- """ @@ -179,10 +178,10 @@ Distribution via setuptools. If setuptools is not installed, run: pip install setuptools -Use the setup.py provided inside, I.e. run: +Use pip, I.e. run: - sudo ./setup.py install - (or ./setup.py install --user to install only for the current user) + sudo pip install --upgrade . + (or just pip install --upgrade . to install only for the current user) diff --git a/pypi_reminder.txt b/pypi_reminder.txt index 219f0d3..aa7ab47 100644 --- a/pypi_reminder.txt +++ b/pypi_reminder.txt @@ -1,9 +1,9 @@ # thats the only way to get md into pypi: git push (for the images) -vi setup.py -> add new version. -rm -rf dist/ -python setup.py sdist +vi setup.cfg -> add new version. +rm -rf build/ dist/ +python3 -m build -nwsx . twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e1a3d04 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,53 @@ +[build-system] +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=3.4.3"] +build-backend = "setuptools.build_meta" + +[project] +name = "mdv" +authors = [{name = "Axiros GmbH", email = "gk@axiros.com"}] +description = "Terminal Markdown Viewer" +keywords = [ + "markdown", + "markup", + "terminal", + "hilighting", + "syntax", + "source code", +] +classifiers = [ + "Programming Language :: Python", + "Natural Language :: English", + "Operating System :: POSIX", + "Topic :: Text Processing :: Markup", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", +] +dependencies = ["pygments", "markdown"] +dynamic = ["version"] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Homepage = "http://github.com/axiros/terminal_markdown_viewer" +Download = "http://github.com/axiros/terminal_markdown_viewer/tarball/" + +[project.optional-dependencies] +yaml = ["pyyaml"] +testing = ["pytest"] + +[project.scripts] +mdv = "mdv:run" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +include = ["mdv", "mdv.*"] +namespaces = false + +[tool.setuptools_scm] + diff --git a/setup.cfg b/setup.cfg index aac6317..7aae70d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,3 @@ -[metadata] -description-file = README.md [report] exclude_lines = pragma: no cover diff --git a/setup.py b/setup.py deleted file mode 100755 index 46c7603..0000000 --- a/setup.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python2.7 -# coding: utf-8 - -"""_ -# Mdv installation - -## Usage - - [sudo] ./setup.py install - ----- -""" - -import os -from setuptools import setup, find_packages - -version = '1.7.4' - -with open(os.path.join(os.path.dirname(__file__), 'README.md')) as fd: - md = fd.read() - -# images hack for pypi: -gh = 'https://raw.githubusercontent.com/axiros/terminal_markdown_viewer/master' -md = md.replace('src="./', 'src="%s/' % gh) - -setup( - name='mdv', - version=version, - packages=find_packages(), - author='Axiros GmbH', - author_email='gk@axiros.com', - description='Terminal Markdown Viewer', - install_requires=['pygments', 'markdown'], - extras_require={'yaml': 'pyyaml'}, - long_description=md, - long_description_content_type='text/markdown', - include_package_data=True, - url='http://github.com/axiros/terminal_markdown_viewer', - download_url='http://github.com/axiros/terminal_markdown_viewer/tarball/', - keywords=['markdown', 'markup', 'terminal', 'hilighting', 'syntax', 'source code',], - tests_require=['pytest'], - classifiers=[ - 'Programming Language :: Python', - 'Natural Language :: English', - 'Operating System :: POSIX', - 'Topic :: Text Processing :: Markup', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - ], - entry_points={'console_scripts': ['mdv = mdv:run']}, -)