-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,43 +41,6 @@ def visit_Assign(self, node): | |
visitor.visit(pt) | ||
return visitor.version | ||
|
||
|
||
def parse_description(): | ||
""" | ||
Parse the description in the README file | ||
CommandLine: | ||
python -c "import setup; print(setup.parse_description())" | ||
""" | ||
from os.path import dirname, join, exists | ||
readme_fpath = join(dirname(__file__), 'README.md') | ||
# print('readme_fpath = %r' % (readme_fpath,)) | ||
# This breaks on pip install, so check that it exists. | ||
if exists(readme_fpath): | ||
# try: | ||
# # convert markdown to rst for pypi | ||
# import pypandoc | ||
# return pypandoc.convert(readme_fpath, 'rst') | ||
# except Exception as ex: | ||
# strip out markdown to make a clean readme for pypi | ||
textlines = [] | ||
with open(readme_fpath, 'r') as f: | ||
capture = False | ||
for line in f.readlines(): | ||
if '# Purpose' in line: | ||
capture = True | ||
elif line.startswith('##'): | ||
break | ||
elif capture: | ||
textlines += [line] | ||
text = ''.join(textlines).strip() | ||
text = text.replace('\n\n', '_NLHACK_') | ||
text = text.replace('\n', ' ') | ||
text = text.replace('_NLHACK_', '\n\n') | ||
return text | ||
return '' | ||
|
||
|
||
def parse_requirements(fname='requirements.txt'): | ||
""" | ||
Parse the package dependencies listed in a requirements file. | ||
|
@@ -107,12 +70,20 @@ def parse_requirements(fname='requirements.txt'): | |
version=version, | ||
author='Jon Crall', | ||
description='Python backend for vimtk plugin', | ||
long_description=parse_description(), | ||
long_description=open('README.rst').read(), | ||
install_requires=install_requires, | ||
# extras_require={ | ||
# 'all': parse_requirements('optional-requirements.txt') | ||
# }, | ||
include_package_data=True, | ||
package_data = { | ||
'vim': [ | ||
'plugin', | ||
'autoload', | ||
], | ||
}, | ||
author_email='[email protected]', | ||
keywords='vim, gvim, python', | ||
url='https://github.com/Erotemic/vimtk', | ||
license='Apache 2', | ||
packages=['vimtk'], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters