diff --git a/Makefile b/Makefile index 7ae088359..1eef94a74 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ -PREFIX = ~/.micropython/lib +PREFIX = $(DESTDIR)/usr/lib/micropython all: # Installs all modules to a lib location, for development testing -CMD="find . -maxdepth 1 -mindepth 1 \( -name '*.py' -not -name 'test_*' -not -name 'setup.py' \) -or \( -type d -not -name 'dist' -not -name '*.egg-info' -not -name '__pycache__' \)| xargs --no-run-if-empty cp -r -t $(PREFIX)" +CMD="find . -maxdepth 1 -mindepth 1 \( -name '*.py' -not -name 'example*' -not -name 'test_*' -not -name 'setup.py' \) -or \( -type d -not -name 'dist' -not -name '*.egg-info' -not -name '__pycache__' \)| xargs --no-run-if-empty cp -r -t $(PREFIX)" install: @mkdir -p $(PREFIX) @if [ -n "$(MOD)" ]; then \ (cd $(MOD); sh -c $(CMD)); \ else \ - for d in $$(find -maxdepth 1 -type d ! -name ".*"); do \ + for d in $$(find -maxdepth 1 -type d ! -name ".*" ! -name "debian"); do \ echo $$d; \ (cd $$d; sh -c $(CMD)); \ done \ diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..08787de15 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,31 @@ +micropython-lib (1.9.3.git0.f20d89c.ev3dev2) stable; urgency=medium + + * debian: don't compile setup.py + + -- David Lechner Sun, 01 Jul 2018 15:51:53 -0500 + +micropython-lib (1.9.3.git0.f20d89c.ev3dev1) stable; urgency=medium + + * merge upstream/master + + -- David Lechner Sun, 01 Jul 2018 11:56:35 -0500 + +micropython-lib (1.9ev3dev3) testing; urgency=medium + + * Fix extra /usr/lib/micropython/micropython-lib directory in binary package + * Compile modules to .mpy before installing + * Change architecture to any + + -- David Lechner Thu, 07 Sep 2017 16:10:57 -0500 + +micropython-lib (1.9ev3dev2) testing; urgency=medium + + * change architecture to all + + -- David Lechner Fri, 18 Aug 2017 17:49:02 -0500 + +micropython-lib (1.9ev3dev1) testing; urgency=medium + + * Initial release + + -- David Lechner Thu, 17 Aug 2017 22:32:13 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..f599e28b8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..c047f515d --- /dev/null +++ b/debian/control @@ -0,0 +1,23 @@ +Source: micropython-lib +Maintainer: David Lechner +Section: python +Priority: optional +Build-Depends: debhelper (>= 10), mpy-cross +Standards-Version: 3.9.8 +Vcs-Browser: https://github.com/ev3dev/micropython-lib +Vcs-Git: https://github.com/ev3dev/micropython-lib.git +Homepage: https://micropython.org + +Package: micropython-lib +Architecture: any +Depends: ${misc:Depends}, micropython +Description: Standard libraries for MicroPython + micropython-lib is a project to develop a non-monolothic standard library + for MicroPython (https://github.com/micropython/micropython). Each module + or package is available as a separate distribution package from PyPI. Each + module is either written from scratch or ported from CPython. + . + Note that the main target of micropython-lib is a "Unix" port of MicroPython. + Actual system requirements vary per module. Though if a module is not related + to I/O, the module should work without problems on bare-metal ports too (e.g. + pyboard). diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000..e723f5add --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,3 @@ +[DEFAULT] +debian-branch=ev3dev-stretch +debian-tag=ev3dev-stretch/%(version)s diff --git a/debian/release.sh b/debian/release.sh new file mode 100755 index 000000000..e32de8867 --- /dev/null +++ b/debian/release.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# Maintainer script for publishing releases. + +set -e + +source=$(dpkg-parsechangelog -S Source) +version=$(dpkg-parsechangelog -S Version) +distribution=$(dpkg-parsechangelog -S Distribution) +codename=$(debian-distro-info --codename --${distribution}) + +OS=debian DIST=${codename} ARCH=amd64 pbuilder-ev3dev build +OS=debian DIST=${codename} ARCH=i386 PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build +OS=debian DIST=${codename} ARCH=armhf PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build +OS=debian DIST=${codename} ARCH=armel PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build +OS=raspbian DIST=${codename} ARCH=armhf pbuilder-ev3dev build + +debsign ~/pbuilder-ev3dev/debian/${codename}-amd64/${source}_${version}_amd64.changes +debsign ~/pbuilder-ev3dev/debian/${codename}-i386/${source}_${version}_i386.changes +debsign ~/pbuilder-ev3dev/debian/${codename}-armhf/${source}_${version}_armhf.changes +debsign ~/pbuilder-ev3dev/debian/${codename}-armel/${source}_${version}_armel.changes +debsign ~/pbuilder-ev3dev/raspbian/${codename}-armhf/${source}_${version}_armhf.changes + +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-amd64/${source}_${version}_amd64.changes +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-i386/${source}_${version}_i386.changes +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-armhf/${source}_${version}_armhf.changes +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-armel/${source}_${version}_armel.changes +dput ev3dev-raspbian ~/pbuilder-ev3dev/raspbian/${codename}-armhf/${source}_${version}_armhf.changes + +gbp buildpackage --git-tag-only diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..9d69dcbd2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,208 @@ +#!/usr/bin/make -f +# -*- makefile -*- +#export DH_VERBOSE=1 + +# asyncio_slow/asyncio_slow.mpy is omitted because it defines async, which +# causes a compile error. + +mpy_files = \ + __future__/__future__.mpy \ + _libc/_libc.mpy \ + _markupbase/_markupbase.mpy \ + abc/abc.mpy \ + argparse/argparse.mpy \ + base64/base64.mpy \ + binascii/binascii.mpy \ + binhex/binhex.mpy \ + bisect/bisect.mpy \ + calendar/calendar.mpy \ + cgi/cgi.mpy \ + cmd/cmd.mpy \ + code/code.mpy \ + codecs/codecs.mpy \ + codeop/codeop.mpy \ + collections.defaultdict/collections/defaultdict.mpy \ + collections.deque/collections/deque.mpy \ + collections/collections/__init__.mpy \ + concurrent.futures/concurrent/futures/__init__.mpy \ + contextlib/contextlib.mpy \ + copy/copy.mpy \ + cpython-uasyncio/uasyncio.mpy \ + csv/csv.mpy \ + curses.ascii/curses/ascii.mpy \ + datetime/datetime.mpy \ + dbm/dbm.mpy \ + decimal/decimal.mpy \ + difflib/difflib.mpy \ + email.charset/email/charset.mpy \ + email.encoders/email/base64mime.mpy \ + email.encoders/email/encoders.mpy \ + email.encoders/email/quoprimime.mpy \ + email.errors/email/errors.mpy \ + email.feedparser/email/feedparser.mpy \ + email.header/email/header.mpy \ + email.internal/email/_encoded_words.mpy \ + email.internal/email/_parseaddr.mpy \ + email.internal/email/_policybase.mpy \ + email.message/email/iterators.mpy \ + email.message/email/message.mpy \ + email.parser/email/parser.mpy \ + email.utils/email/utils.mpy \ + errno/errno.mpy \ + fcntl/fcntl.mpy \ + ffilib/ffilib.mpy \ + fnmatch/fnmatch.mpy \ + fnmatch/fnmatch.mpy \ + formatter/formatter.mpy \ + fractions/fractions.mpy \ + ftplib/ftplib.mpy \ + functools/functools.mpy \ + getopt/getopt.mpy \ + getpass/getpass.mpy \ + gettext/gettext.mpy \ + glob/glob.mpy \ + gzip/gzip.mpy \ + hashlib/hashlib/__init__.mpy \ + hashlib/hashlib/_sha224.mpy \ + hashlib/hashlib/_sha256.mpy \ + hashlib/hashlib/_sha384.mpy \ + hashlib/hashlib/_sha512.mpy \ + heapq/heapq.mpy \ + hmac/hmac.mpy \ + html.entities/html/entities.mpy \ + html.parser/html/parser.mpy \ + html/html/__init__.mpy \ + http.client/http/client.mpy \ + imaplib/imaplib.mpy \ + imp/imp.mpy \ + importlib/importlib.mpy \ + inspect/inspect.mpy \ + io/io.mpy \ + ipaddress/ipaddress.mpy \ + itertools/itertools.mpy \ + json/json/__init__.mpy \ + json/json/decoder.mpy \ + json/json/encoder.mpy \ + json/json/scanner.mpy \ + json/json/tool.mpy \ + keyword/keyword.mpy \ + linecache/linecache.mpy \ + locale/locale.mpy \ + logging/logging.mpy \ + machine/machine/__init__.mpy \ + machine/machine/pin.mpy \ + machine/machine/timer.mpy \ + mailbox/mailbox.mpy \ + mailcap/mailcap.mpy \ + mimetypes/mimetypes.mpy \ + multiprocessing/multiprocessing.mpy \ + nntplib/nntplib.mpy \ + numbers/numbers.mpy \ + operator/operator.mpy \ + optparse/optparse.mpy \ + os.path/os/path.mpy \ + os/os/__init__.mpy \ + pathlib/pathlib.mpy \ + pdb/pdb.mpy \ + pickle/pickle.mpy \ + pickletools/pickletools.mpy \ + pkg_resources/pkg_resources.mpy \ + pkgutil/pkgutil.mpy \ + platform/platform.mpy \ + poplib/poplib.mpy \ + posixpath/posixpath.mpy \ + pprint/pprint.mpy \ + profile/profile.mpy \ + pty/pty.mpy \ + pwd/pwd.mpy \ + pyb/pyb.mpy \ + pystone_lowmem/pystone_lowmem.mpy \ + pystone/pystone.mpy \ + queue/queue.mpy \ + quopri/quopri.mpy \ + random/random.mpy \ + re-pcre/re.mpy \ + readline/readline.mpy \ + reprlib/reprlib.mpy \ + runpy/runpy.mpy \ + sched/sched.mpy \ + sdist_upip.mpy \ + select/select.mpy \ + selectors/selectors.mpy \ + shelve/shelve.mpy \ + shlex/shlex.mpy \ + shutil/shutil.mpy \ + signal/signal.mpy \ + smtplib/smtplib.mpy \ + socket/socket.mpy \ + socketserver/socketserver.mpy \ + sqlite3/sqlite3.mpy \ + ssl/ssl.mpy \ + stat/stat.mpy \ + statistics/statistics.mpy \ + string/string.mpy \ + stringprep/stringprep.mpy \ + struct/struct.mpy \ + subprocess/subprocess.mpy \ + sys/sys.mpy \ + tarfile/tarfile.mpy \ + telnetlib/telnetlib.mpy \ + tempfile/tempfile.mpy \ + test.pystone/test/pystone.mpy \ + test.support/test/support.mpy \ + textwrap/textwrap.mpy \ + threading/threading.mpy \ + time/time.mpy \ + timeit/timeit.mpy \ + trace/trace.mpy \ + traceback/traceback.mpy \ + tty/tty.mpy \ + types/types.mpy \ + typing/typing.mpy \ + uaiohttpclient/README \ + uaiohttpclient/uaiohttpclient.mpy \ + uasyncio.core/uasyncio/core.mpy \ + uasyncio.queues/uasyncio/queues.mpy \ + uasyncio.synchro/uasyncio/synchro.mpy \ + uasyncio.udp/uasyncio/udp.mpy \ + uasyncio.websocket.server/uasyncio/websocket/server.mpy \ + uasyncio/README.rst \ + uasyncio/uasyncio/__init__.mpy \ + ucontextlib/ucontextlib.mpy \ + ucurses/ucurses/__init__.mpy \ + udnspkt/udnspkt.mpy \ + umqtt.robust/umqtt/robust.mpy \ + umqtt.simple/umqtt/simple.mpy \ + unicodedata/unicodedata.mpy \ + unittest/unittest.mpy \ + upip/upip_utarfile.mpy \ + upip/upip.mpy \ + upysh/upysh.mpy \ + urequests/urequests.mpy \ + urllib.parse/urllib/parse.mpy \ + urllib.urequest/urllib/urequest.mpy \ + urllib/urllib.mpy \ + urllib/urllib.mpy \ + utarfile/utarfile.mpy \ + uu/uu.mpy \ + uuid/uuid.mpy \ + venv/venv.mpy \ + warnings/warnings.mpy \ + weakref/weakref.mpy \ + xmltok/xmltok.mpy \ + zipfile/zipfile.mpy \ + zlib/zlib.mpy + +%: + dh $@ + +%.mpy: %.py + mpy-cross -v -v -mcache-lookup-bc $< + +# compile .py > .mpy +override_dh_auto_build: $(mpy_files) + +override_dh_auto_install: + for d in $(mpy_files); do \ + install -D --mode=644 $$d debian/micropython-lib/usr/lib/micropython/$${d#*/}; \ + done diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..676af1ece --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +tar-ignore=.*