-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update setup for better README formatting
- Loading branch information
Showing
2 changed files
with
4 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
description-file = README.md |
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 |
---|---|---|
|
@@ -4,16 +4,11 @@ | |
import glob | ||
import re | ||
import io | ||
import subprocess | ||
import setuptools | ||
import setuptools | ||
from setuptools.command.test import test as TestCommand | ||
|
||
VERSION_PATH='commcare_export/VERSION' | ||
|
||
# Build README.txt from README.md if not present, and if we are actually building for distribution to pypi | ||
if not os.path.exists('README.txt') and 'sdist' in sys.argv: | ||
subprocess.call(['pandoc', '--to=rst', '--output=README.txt', 'README.md']) | ||
|
||
# Overwrite VERSION if we are actually building for a distribution to pypi | ||
# This code path requires dependencies, etc, to be available | ||
if 'sdist' in sys.argv: | ||
|
@@ -28,11 +23,9 @@ | |
# Crash if the VERSION is not a simple version and it is going to register or upload | ||
if 'register' in sys.argv or 'upload' in sys.argv: | ||
if not re.match('\d+\.\d+\.\d+', version): | ||
print('Version %s is not an appropriate version for publicizing!' % version) | ||
print('Version %s is not an appropriate version for publicizing! Make a tag and then try again.' % version) | ||
sys.exit(1) | ||
|
||
readme = 'README.txt' if os.path.exists('README.txt') else 'README.md' | ||
|
||
class PyTest(TestCommand): | ||
def finalize_options(self): | ||
TestCommand.finalize_options(self) | ||
|
@@ -49,7 +42,6 @@ def run_tests(self): | |
name = "commcare-export", | ||
version = version, | ||
description = 'A command-line tool (and Python library) to extract data from CommCareHQ into a SQL database or Excel workbook', | ||
long_description = io.open(readme, encoding='utf-8').read(), | ||
author = 'Dimagi', | ||
author_email = '[email protected]', | ||
url = "https://github.com/dimagi/commcare-export", | ||
|