From 26ca8993240c336c0a393d305c534fb4004dcaf8 Mon Sep 17 00:00:00 2001 From: joncrall Date: Sat, 13 Apr 2019 22:58:07 -0400 Subject: [PATCH] wip --- setup.py | 47 +++++++++-------------------------------------- vimtk/core.py | 4 +++- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/setup.py b/setup.py index bc5f380..072670d 100644 --- a/setup.py +++ b/setup.py @@ -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='erotemic@gmail.com', + keywords='vim, gvim, python', url='https://github.com/Erotemic/vimtk', license='Apache 2', packages=['vimtk'], diff --git a/vimtk/core.py b/vimtk/core.py index 2472911..7c11a87 100644 --- a/vimtk/core.py +++ b/vimtk/core.py @@ -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()