Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Apr 14, 2019
1 parent e37bf72 commit 26ca899
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 39 deletions.
47 changes: 9 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'],
Expand Down
4 changes: 3 additions & 1 deletion vimtk/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ def _linux_install():
"""
Installs vimtk to the standard pathogen bundle directory
"""
pass
import pkg_resources
import vimtk
vim_data = pkg_resources.resource_string(vimtk.__name__, "vim")


CONFIG = Config()
Expand Down

0 comments on commit 26ca899

Please sign in to comment.