Skip to content

Commit bb7fe0c

Browse files
committed
sdist_upip: Update to the latest from pycopy-lib.
1 parent eba59c1 commit bb7fe0c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sdist_upip.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
# This module is part of Pycopy https://github.com/pfalcon/pycopy
2+
# and pycopy-lib https://github.com/pfalcon/pycopy-lib, projects to
3+
# create a (very) lightweight full-stack Python distribution.
4+
#
5+
# Copyright (c) 2016-2019 Paul Sokolovsky
6+
# Licence: MIT
17
#
28
# This module overrides distutils (also compatible with setuptools) "sdist"
3-
# command to perform pre- and post-processing as required for MicroPython's
9+
# command to perform pre- and post-processing as required for Pycopy's
410
# upip package manager.
511
#
612
# Preprocessing steps:
@@ -85,7 +91,11 @@ def make_resource_module(manifest_files):
8591
resources = []
8692
# Any non-python file included in manifest is resource
8793
for fname in manifest_files:
88-
ext = fname.rsplit(".", 1)[1]
94+
ext = fname.rsplit(".", 1)
95+
if len(ext) > 1:
96+
ext = ext[1]
97+
else:
98+
ext = ""
8999
if ext != "py":
90100
resources.append(fname)
91101

0 commit comments

Comments
 (0)