[med-svn] [Git][med-team/pyscanfcs][master] 9 commits: New upstream version 0.3.6+ds
Steffen Möller
gitlab at salsa.debian.org
Mon Jun 29 23:44:37 BST 2020
Steffen Möller pushed to branch master at Debian Med / pyscanfcs
Commits:
96db1a80 by Steffen Moeller at 2020-06-30T00:30:53+02:00
New upstream version 0.3.6+ds
- - - - -
0150be78 by Steffen Moeller at 2020-06-30T00:30:53+02:00
routine-update: New upstream version
- - - - -
b7e105f0 by Steffen Moeller at 2020-06-30T00:30:53+02:00
Update upstream source from tag 'upstream/0.3.6+ds'
Update to upstream version '0.3.6+ds'
with Debian dir e733c5bd6b0b7d883d9bdcd27ca19c513d9b442f
- - - - -
c26f92a4 by Steffen Moeller at 2020-06-30T00:30:54+02:00
routine-update: Standards-Version: 4.5.0
- - - - -
a5ea7fd2 by Steffen Moeller at 2020-06-30T00:30:54+02:00
routine-update: debhelper-compat 13
- - - - -
fbec8e62 by Steffen Moeller at 2020-06-30T00:30:58+02:00
routine-update: Add salsa-ci file
- - - - -
105b924f by Steffen Moeller at 2020-06-30T00:30:58+02:00
routine-update: Rules-Requires-Root: no
- - - - -
e3ba7d4d by Steffen Moeller at 2020-06-30T00:31:01+02:00
Set upstream metadata fields: Bug-Submit.
Fixes: lintian: upstream-metadata-missing-bug-tracking
See-also: https://lintian.debian.org/tags/upstream-metadata-missing-bug-tracking.html
- - - - -
0a48fca7 by Steffen Moeller at 2020-06-30T00:43:47+02:00
New upstream version.
- - - - -
13 changed files:
- + .github/FUNDING.yml
- CHANGELOG
- debian/changelog
- debian/control
- + debian/patches/noDownloadOfDoc.patch
- + debian/patches/series
- debian/rules
- + debian/salsa-ci.yml
- debian/upstream/metadata
- pyscanfcs/_version.py
- pyscanfcs/gui_wx/doc.py
- pyscanfcs/openfile.py
- setup.py
Changes:
=====================================
.github/FUNDING.yml
=====================================
@@ -0,0 +1,2 @@
+github: paulmueller
+liberapay: paulmueller
=====================================
CHANGELOG
=====================================
@@ -1,3 +1,5 @@
+0.3.6
+ - setup: change dependency of scikit-image to tifffile 2020.5.25
0.3.5
- maintenance release
0.3.4
=====================================
debian/changelog
=====================================
@@ -1,12 +1,21 @@
-pyscanfcs (0.3.5+ds-2) UNRELEASED; urgency=medium
+pyscanfcs (0.3.6+ds-1) unstable; urgency=medium
+ [ Andreas Tille ]
* Team upload.
* Standards-Version: 4.4.1
* Do not parse d/changelog
* Set upstream metadata fields: Bug-Database.
* Unify test script with other tests in Debian Med
- -- Andreas Tille <tille at debian.org> Wed, 18 Dec 2019 10:48:28 +0100
+ [ Steffen Moeller ]
+ * Standards-Version: 4.5.0 (routine-update)
+ * debhelper-compat 13 (routine-update)
+ * Add salsa-ci file (routine-update)
+ * Rules-Requires-Root: no (routine-update)
+ * Set upstream metadata fields: Bug-Submit.
+ * Better clean, don't download .pdf
+
+ -- Steffen Moeller <moeller at debian.org> Tue, 30 Jun 2020 00:31:02 +0200
pyscanfcs (0.3.5+ds-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -4,7 +4,7 @@ Uploaders: Alexandre Mestiashvili <mestia at debian.org>
Section: python
Priority: optional
Build-Depends: cython3,
- debhelper-compat (= 12),
+ debhelper-compat (= 13),
dh-python,
faketime,
imagemagick,
@@ -18,16 +18,18 @@ Build-Depends: cython3,
python3-scipy,
python3-setuptools,
python3-skimage,
+ python3-tifffile,
python3-wxgtk4.0,
texlive-bibtex-extra,
texlive-fonts-recommended,
texlive-latex-extra,
texlive-latex-recommended,
texlive-science
-Standards-Version: 4.4.1
+Standards-Version: 4.5.0
Vcs-Browser: https://salsa.debian.org/med-team/pyscanfcs
Vcs-Git: https://salsa.debian.org/med-team/pyscanfcs.git
Homepage: https://fcs-analysis.github.io/PyScanFCS/
+Rules-Requires-Root: no
Package: pyscanfcs
Architecture: any
=====================================
debian/patches/noDownloadOfDoc.patch
=====================================
@@ -0,0 +1,17 @@
+Index: pyscanfcs/setup.py
+===================================================================
+--- pyscanfcs.orig/setup.py
++++ pyscanfcs/setup.py
+@@ -32,12 +32,6 @@ else:
+ # Download documentation if it was not compiled
+ pdfdoc = join(dirname(realpath(__file__)), "doc/PyScanFCS_doc.pdf")
+ webdoc = "https://github.com/FCS-analysis/PyScanFCS/wiki/PyScanFCS_doc.pdf"
+- if not exists(pdfdoc):
+- print("Downloading {} from {}".format(pdfdoc, webdoc))
+- import urllib
+- #testfile = urllib.URLopener()
+- urllib.request.urlretrieve(webdoc, pdfdoc)
+-
+
+ author = u"Paul Müller"
+ authors = [author]
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+noDownloadOfDoc.patch
=====================================
debian/rules
=====================================
@@ -24,8 +24,10 @@ endif
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_clean:
- touch doc/PyScanFCS_doc.pdf
dh_auto_clean
+ rm -rf .pytest_cache
+ rm -f doc/PyScanFCS_doc.pdf doc/PyScanFCS_doc.synctex.gz doc/PyScanFCS_doc.pdf debian/pyscanfcs.xpm PyScanFCS_doc.pdf
+ rm -f doc/PyScanFCS_doc.aux doc/PyScanFCS_doc.bbl doc/PyScanFCS_doc.blg doc/PyScanFCS_doc.log doc/PyScanFCS_doc.toc doc/PyScanFCS_doc_content.aux pyscanfcs/bin_pe.c
override_dh_clean:
dh_clean
=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,4 @@
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
=====================================
debian/upstream/metadata
=====================================
@@ -1,3 +1,4 @@
+Bug-Submit: https://github.com/paulmueller/PyScanFCS/issues/new
Registry:
- Name: OMICtools
Entry: OMICS_21694
=====================================
pyscanfcs/_version.py
=====================================
@@ -1,20 +1,56 @@
#!/usr/bin/env python
-"""Determine package version for git repositories from tags
-
-Each time this file is imported it checks if the ".git" folder is
-present and if so, obtains the version from the git history using
-`git describe`. This information is then stored in the file
-`_version_save.py` which is not versioned by git, but distributed
-along e.g. on PyPI.
+"""Determine package version from git repository tag
+
+Each time this file is imported it checks whether the package version
+can be determined using `git describe`. If this fails (because either
+this file is not located at the 1st level down the repository root or
+it is not under version control), the version is read from the script
+"_version_save.py" which is not versioned by git, but always included
+in the final distribution archive (e.g. via PyPI). If the git version
+does not match the saved version, then "_version_save.py" is updated.
+
+
+Usage
+-----
+1. Put this file in your main module directory:
+
+ REPO_ROOT/package_name/_version.py
+
+2. Add this line to REPO_ROOT/package_name/__init__.py
+
+ from ._version import version as __version__ # noqa: F401
+
+3. (Optional) Add this line to REPO_ROOT/.gitignore
+
+ _version_save.py
+
+Features
+--------
+- supports Python 2 and 3
+- supports frozen applications (e.g. PyInstaller)
+- supports installing into a virtual environment that is located in
+ a git repository
+- saved version is located in a python file and therefore no other
+ files (e.g. MANIFEST.in) need be edited
+- fallback version is the creation date
+- excluded from code coverage via "pragma: no cover"
+
+Changelog
+---------
+2019-11-06.2
+ - use os.path.split instead of counting os.path.sep (Windows)
+2019-11-06
+ - remove deprecated imp dependency (replace with parser)
+ - check whether this file is versioned and its location is correct
+ - code cleanup and docs update
"""
from __future__ import print_function
# Put the entire script into a `True` statement and add the hint
# `pragma: no cover` to ignore code coverage here.
if True: # pragma: no cover
- import imp
import os
- from os.path import abspath, basename, dirname, join
+ from os.path import abspath, basename, dirname, join, split
import subprocess
import sys
import time
@@ -33,7 +69,7 @@ if True: # pragma: no cover
ourdir = dirname(abspath(__file__))
def _minimal_ext_cmd(cmd):
- # construct minimal environment
+ # Construct minimal environment
env = {}
for k in ['SYSTEMROOT', 'PATH']:
v = os.environ.get(k)
@@ -48,19 +84,33 @@ if True: # pragma: no cover
stderr=subprocess.PIPE,
env=env)
out = pop.communicate()[0]
- return out
+ return out.strip().decode('ascii', errors="ignore")
# change directory
olddir = abspath(os.curdir)
os.chdir(ourdir)
+ # Make sure that we are getting "git describe" from our own
+ # repository (and not from a repository where we just happen
+ # to be in the directory tree).
+ git_revision = ""
try:
- out = _minimal_ext_cmd(['git', 'describe', '--tags', 'HEAD'])
- git_revision = out.strip().decode('ascii')
+ # If this file is not under version control, "loc" will
+ # be empty.
+ loc = _minimal_ext_cmd(['git', 'ls-files', '--full-name',
+ __file__])
+ # If it is under version control, it should be located
+ # one hierarchy down from the repository root (either
+ # __file__ is "docs/conf.py" or "package_name/_version.py".
+ if len(split(loc)) == 2:
+ try:
+ git_revision = _minimal_ext_cmd(['git', 'describe',
+ '--tags', 'HEAD'])
+ except OSError:
+ pass
except OSError:
- git_revision = ""
-
- # go back to original directory
+ pass
+ # Go back to original directory
os.chdir(olddir)
return git_revision
@@ -69,8 +119,11 @@ if True: # pragma: no cover
"""load version from version_save.py"""
longversion = ""
try:
- _version_save = imp.load_source("_version_save", versionfile)
- longversion = _version_save.longversion
+ with open(versionfile, "r") as fd:
+ data = fd.readlines()
+ for line in data:
+ if line.startswith("longversion"):
+ longversion = line.split("=")[1].strip().strip("'")
except BaseException:
try:
from ._version_save import longversion
@@ -82,7 +135,7 @@ if True: # pragma: no cover
return longversion
- def save_version(version, versionfile):
+ def write_version(version, versionfile):
"""save version to version_save.py"""
data = "#!/usr/bin/env python\n" \
+ "# This file was created automatically\n" \
@@ -91,8 +144,11 @@ if True: # pragma: no cover
with open(versionfile, "w") as fd:
fd.write(data.format(VERSION=version))
except BaseException:
- msg = "Could not write package version to {}.".format(versionfile)
- warnings.warn(msg)
+ if not os.path.exists(versionfile):
+ # Only issue a warning if the file does not exist.
+ msg = "Could not write package version to {}.".format(
+ versionfile)
+ warnings.warn(msg)
hdir = dirname(abspath(__file__))
if basename(__file__) == "conf.py" and "name" in locals():
@@ -116,7 +172,7 @@ if True: # pragma: no cover
# 2. previously created version file
if longversion == "":
- # Either this is this is not a git repository or we are in the
+ # Either this is not a git repository or we are in the
# wrong git repository.
# Get the version from the previously generated `_version_save.py`
longversion = load_version(versionfile)
@@ -135,7 +191,7 @@ if True: # pragma: no cover
# This is only done if the program is not frozen (with e.g.
# pyinstaller),
if longversion != load_version(versionfile):
- save_version(longversion, versionfile)
+ write_version(longversion, versionfile)
# PEP 440-conform development version:
version = ".post".join(longversion.split("-")[:2])
=====================================
pyscanfcs/gui_wx/doc.py
=====================================
@@ -8,7 +8,7 @@ import matplotlib
import multipletau
import numpy
import scipy
-import skimage
+import tifffile
import wx
@@ -108,8 +108,8 @@ def SoftwareUsed():
"\n - matplotlib " + matplotlib.__version__ +\
"\n - multipletau " + multipletau.__version__ +\
"\n - NumPy " + numpy.__version__ +\
- "\n - scikit-image " + skimage.__version__ +\
"\n - SciPy " + scipy.__version__ +\
+ "\n - tifffile " + tifffile.__version__ +\
"\n - wxPython " + wx.__version__
if hasattr(sys, 'frozen'):
pyinst = "\n\nThis executable has been created using PyInstaller."
=====================================
pyscanfcs/openfile.py
=====================================
@@ -1,7 +1,7 @@
"""filetype definitions"""
import astropy.io.fits
import numpy as np
-from skimage.external import tifffile
+import tifffile
def openAny(path, callback=None):
=====================================
setup.py
=====================================
@@ -68,8 +68,8 @@ setup(
"matplotlib>=1.1.0",
"multipletau>=0.1.4",
"numpy>=1.5.1",
- "scikit-image>=0.13.1",
"scipy>=0.8.0",
+ "tifffile>=2020.5.25",
"wxpython>=4.0.3",
],
setup_requires=['cython', 'numpy', 'pytest-runner'],
View it on GitLab: https://salsa.debian.org/med-team/pyscanfcs/-/compare/e704228a2fccd8542bcbe1e219e135f6914cfd6c...0a48fca7868e7758b0393e60f3696db080480a11
--
View it on GitLab: https://salsa.debian.org/med-team/pyscanfcs/-/compare/e704228a2fccd8542bcbe1e219e135f6914cfd6c...0a48fca7868e7758b0393e60f3696db080480a11
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200629/3de29bc4/attachment-0001.html>
More information about the debian-med-commit
mailing list