File: 00_prepare_for_PyPI.sh

package info (click to toggle)
uncertainties 3.0.2.github-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 648 kB
  • sloc: python: 3,972; makefile: 93; sh: 19
file content (39 lines) | stat: -rwxr-xr-x 1,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

# This script must be run before packaging (python setup.py sdist upload).

# WARNING: this script erases any uncertainties-py23 and uncertainties-py27
# found in the current directory.

## Only committed versions are packaged, to help with debugging published code:
git checkout release
git commit -a

# The Python 2.3-2.5 version should always be up to date:
git checkout release_python2.3
git merge release

# Default branch for working on the code:
git checkout release

## Getting the Python 2.7+ version:

rm -rf uncertainties-py27 && \
git archive --output /tmp/u.tar master uncertainties && \
tar -C /tmp -xf /tmp/u.tar && \
mv /tmp/uncertainties uncertainties-py27 && \
echo "Python 2.7+ version imported"

## Getting the Python 2.3 version:

rm -rf uncertainties-py23 && \
git archive --output /tmp/u.tar release_python2.3 uncertainties && \
tar -C /tmp -xf /tmp/u.tar && \
mv /tmp/uncertainties uncertainties-py23 && \
echo "Python 2.3 version imported"

# Packaging:
python setup.py sdist && \
echo "Package created.  The package can be uploaded with setup.py sdist upload."
echo "WARNING: current git branch is:"
git branch | grep '^\*'