Skip to content

Commit

Permalink
Don't upload bare linux wheels, fixed long description
Browse files Browse the repository at this point in the history
  • Loading branch information
jrast committed Oct 5, 2019
1 parent 7160e73 commit 84fe9d2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ci/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ done
# Bundle external shared libraries into the wheels
for whl in /io/wheels/*.whl; do
auditwheel repair "$whl" --plat $PLAT -w /io/wheels/
# Delete the original wheel. They are unusable as they contain no valid platform tag.
rm "$whl"
done

# Install packages and test
Expand Down
24 changes: 24 additions & 0 deletions ci/download_release_files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import requests
import os

HERE = os.path.dirname(__file__)
DIST_DIR = os.path.abspath(os.path.join(HERE, '..', 'dist'))
REPO = 'jrast/littlefs-python'
resp = requests.get('https://api.github.com/repos/%s/releases/latest' % REPO)

if resp.status_code != 200:
raise RuntimeError('Github API call failed!')

data = resp.json()

print('Release Tag:', data['tag_name'])

print('Assets:')
for e in data['assets']:
print('Downloading', e['name'])
r = requests.get(e['browser_download_url'], allow_redirects=True)
if r.status_code != 200:
raise RuntimeError('Downloading %s failed!' % e['name'])
with open(os.path.join(DIST_DIR, e['name']), 'wb') as fh:
fh.write(r.content)

11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from os import path
from setuptools import setup, find_packages
from setuptools import Extension
from Cython.Build import cythonize
Expand All @@ -16,20 +17,28 @@
)
]



setup_requires = [
'setuptools_scm',
]

HERE = path.abspath(path.dirname(__file__))
with open(path.join(HERE, 'README.rst'), encoding='utf-8') as fh:
long_description = fh.read()

setup(
name='littlefs-python',
url='https://github.com/jrast/littlefs-python',
author='Jürg Rast',
author_email='[email protected]',
long_description=long_description,
long_description_content_type='text/rst',
use_scm_version=True,
setup_requires=setup_requires,
packages=find_packages('src'),
package_dir={'': 'src'},
ext_modules=cythonize(EXTENSIONS, language_level=3, annotate=False,
ext_modules=cythonize(EXTENSIONS, language_level=3, annotate=False,
compiler_directives={'embedsignature': True}),
classifiers=[
'Development Status :: 3 - Alpha',
Expand Down

0 comments on commit 84fe9d2

Please sign in to comment.