Skip to content

Commit

Permalink
Merge pull request #108 from benabel/master
Browse files Browse the repository at this point in the history
Wheel packaging added (not tested yet)
  • Loading branch information
lebigot authored Nov 23, 2019
2 parents 2fc16f3 + 01b66ac commit e3b8f71
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
10 changes: 6 additions & 4 deletions 00_prepare_for_PyPI.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

# This script must be run before packaging (python setup.py sdist upload).
# This script prepares the package for PyPI. It must be run
# before uploading it on PyPI.

# WARNING: this script erases any uncertainties-py23 and uncertainties-py27
# found in the current directory.
Expand Down Expand Up @@ -33,7 +34,8 @@ 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."
python setup.py sdist bdist_wheel && \
echo "Package created. The package can be uploaded with twine upload dist/...,"
echo "where ... is the new version."
echo "WARNING: current git branch is:"
git branch | grep '^\*'
git branch | grep '^\*'
32 changes: 14 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

# !! This program must run with all version of Python since 2.3 included.

import sys
import os
import sys

min_version = (2, 3)
error_msg = ("Sorry, this package is for Python %d.%d and higher only."
% min_version)
error_msg = ("Sorry, this package is for Python %d.%d and higher only." %
min_version)

try:
if sys.version_info < min_version:
Expand Down Expand Up @@ -46,17 +46,14 @@
author='Eric O. LEBIGOT (EOL)',
author_email='eric.lebigot@normalesup.org',
url='http://uncertainties-python-package.readthedocs.io/',

license='''\
This software can be used under one of the following two licenses: \
(1) The Revised BSD License. \
(2) Any other license, as long as it is obtained from the original \
author.''',

description=('Transparent calculations with uncertainties on the'
' quantities involved (aka error propagation);'
' fast calculation of derivatives'),

long_description='''\
Overview
========
Expand Down Expand Up @@ -162,7 +159,7 @@
- 3.1.2: Partial fix for NumPy 1.17 and ``unumpy.ulinalg.pinv()``.
- 3.1: Variables built through a correlation or covariance matrix, and that
have uncertainties that span many orders of magnitude are now
have uncertainties that span many orders of magnitude are now
calculated more accurately (improved ``correlated_values()`` and
``correlated_values_norm()`` functions).
- 3.0: Massive speedup for some operations involving large numbers of numbers with uncertainty, like ``sum(ufloat(1, 1) for _ in xrange(100000))`` (this is about 5,000 times faster than before).
Expand Down Expand Up @@ -296,12 +293,11 @@
.. _main website: http://uncertainties-python-package.readthedocs.io/
.. _code updater: http://uncertainties-python-package.readthedocs.io/en/latest/index.html#migration-from-version-1-to-version-2
.. _formatting: http://uncertainties-python-package.readthedocs.io/en/latest/user_guide.html#printing''',

keywords=['error propagation', 'uncertainties',
'uncertainty calculations',
'standard deviation',
'derivatives', 'partial derivatives', 'differentiation'],

keywords=[
'error propagation', 'uncertainties', 'uncertainty calculations',
'standard deviation', 'derivatives', 'partial derivatives',
'differentiation'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand Down Expand Up @@ -342,10 +338,11 @@
package_dir={'uncertainties': package_dir},

# Files are defined in MANIFEST (which is automatically created by
# python setup.py sdist):
packages=['uncertainties', 'uncertainties.unumpy',
'uncertainties.lib1to2', 'uncertainties.lib1to2.fixes']
)
# python setup.py sdist bdist_wheel):
packages=[
'uncertainties', 'uncertainties.unumpy', 'uncertainties.lib1to2',
'uncertainties.lib1to2.fixes'
])

# The best available setup() is used (some users do not have
# setuptools):
Expand All @@ -358,7 +355,6 @@

# Allows python setup.py nosetests to do the right thing:
'use_2to3': True,

'tests_require': ['nose', 'numpy'],
# Optional dependencies install using:
# `easy_install uncertainties[optional]`
Expand Down

0 comments on commit e3b8f71

Please sign in to comment.