Skip to content

Commit 9a8e819

Browse files
committed
Changed how description in conda package is generated.
1 parent 5f4be8f commit 9a8e819

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ fabric.properties
137137
build
138138
*.egg-info
139139
**/__pycache__
140-
*/conda
140+
**/conda

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
domdf_python_tools
33
**********************
44

5-
.. image:: https://travis-ci.com/domdfcoding/domdf_python_tools.svg?branch=master
5+
.. image:: https://img.shields.io/travis/com/domdfcoding/domdf_python_tools/master?logo=travis
66
:target: https://travis-ci.com/domdfcoding/domdf_python_tools
77
:alt: Build Status
88
.. image:: https://readthedocs.org/projects/domdf_python_tools/badge/?version=latest

__pkginfo__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545

4646
# Get info from files; set: long_description
4747
long_description = (repo_root / "README.rst").read_text() + '\n'
48+
conda_description = """Helpful functions for Python
49+
50+
51+
Before installing please ensure you have added the "conda-forge" channel.
52+
"""
4853
install_requires = (repo_root / "requirements.txt").read_text().split('\n')
4954
extras_require = {"dates": ["pytz>=2019.1"]}
5055

make_conda_recipe.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from io import StringIO
88

99
from __pkginfo__ import (
10-
author, extras_require, install_requires, long_description,
11-
modname, project_urls, repo_root, short_desc, VERSION, web,
10+
author, long_description, conda_description, extras_require, install_requires, modname, project_urls, repo_root, short_desc, VERSION,
11+
web,
1212
)
1313

1414
recipe_dir = repo_root / "conda"
@@ -27,8 +27,9 @@
2727
all_requirements = set(x.replace(" ", '') for x in set(all_requirements))
2828
requirements_block = "\n".join(f" - {req}" for req in all_requirements)
2929

30-
txt_readme = publish_file(source=StringIO(long_description), writer=rst2txt.Writer())
31-
description_block = "\n".join([line.replace('"', '\\"') for line in txt_readme.split("\n")])
30+
# txt_readme = publish_file(source=StringIO(long_description), writer=rst2txt.Writer())
31+
# description_block = "\n".join([line.replace('"', '\\"') for line in txt_readme.split("\n")])
32+
description_block = conda_description.replace('"', '\\"')
3233

3334
with open(recipe_dir / "meta.yaml", "w") as fp:
3435
fp.write(f"""{{% set name = "{modname}" %}}

0 commit comments

Comments
 (0)