Skip to content

Commit f41da19

Browse files
authored
Merge pull request #42 from saxbophone/develop
Fix package to work with new pypi.org
2 parents 86dc6ca + c8b626b commit f41da19

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ install-deps:
55
pip install -r python_requirements/base.txt
66
pip install -r python_requirements/test.txt
77

8-
install-build-deps:
9-
pip install -r python_requirements/build.txt
10-
118
clean:
129
rm -rf basest/*.py[cod] tests/*.py[cod] *.py[cod] *__pycache__*
1310
rm -rf basest.egg-info build dist
@@ -30,3 +27,6 @@ stress-test:
3027

3128
package:
3229
python setup.py sdist bdist_wheel
30+
31+
release: package
32+
twine upload dist/*

basest/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414

1515

1616
__all__ = ['core', 'encoders', 'exceptions']
17+
18+
name = 'basest'

python_requirements/build.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,13 @@
1313

1414
import os
1515

16-
from pip.req import parse_requirements
17-
from pypandoc import convert_text
1816
from setuptools import find_packages, setup
1917

2018

21-
def readme(filepath):
22-
"""
23-
Utility function to convert the README file to RST format and return it.
24-
"""
25-
return convert_text(
26-
open(os.path.join(os.path.dirname(__file__), filepath)).read(),
27-
'rst', format='md'
28-
)
19+
def parse_requirements(filepath):
20+
""" load requirements from a pip requirements file """
21+
lineiter = (line.strip() for line in open(filepath))
22+
return [line for line in lineiter if line and not line.startswith('#')]
2923

3024

3125
def retrieve_deps(filepath):
@@ -41,11 +35,14 @@ def retrieve_deps(filepath):
4135

4236
setup(
4337
name='basest',
44-
version='0.7.0',
38+
version='0.7.1',
4539
description=(
4640
'Converts symbols from any number base to any other number base'
4741
),
48-
long_description=readme('README.md'),
42+
long_description=open(
43+
os.path.join(os.path.dirname(__file__), 'README.md')
44+
).read(),
45+
long_description_content_type='text/markdown',
4946
url='https://github.com/saxbophone/basest-python',
5047
author='Joshua Saxby',
5148
author_email='[email protected]',
@@ -73,10 +70,10 @@ def retrieve_deps(filepath):
7370
],
7471
keywords='number base encoder decoder conversion encoding decoding',
7572
packages=find_packages(),
76-
install_requires=retrieve_deps('python_requirements/base.txt'),
73+
install_requires=parse_requirements('python_requirements/base.txt'),
7774
extras_require={
78-
'test': retrieve_deps('python_requirements/test.txt'),
79-
'build': retrieve_deps('python_requirements/build.txt'),
75+
'test': parse_requirements('python_requirements/test.txt'),
76+
'build': parse_requirements('python_requirements/build.txt'),
8077
},
8178
package_data={
8279
'': ['README.md', 'LICENSE'],

0 commit comments

Comments
 (0)