[med-svn] [Git][med-team/macs][upstream] New upstream version 2.2.9.1

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Wed Aug 9 11:33:09 BST 2023



Michael R. Crusoe pushed to branch upstream at Debian Med / macs


Commits:
9388a902 by Michael R. Crusoe at 2023-08-09T11:46:34+02:00
New upstream version 2.2.9.1
- - - - -


27 changed files:

- + .github/workflows/build-and-test-MACS2-macos12.yml
- + .github/workflows/build-and-test-MACS2-non-x64.yml
- + .github/workflows/build-and-test-MACS2-x64.yml
- + .github/workflows/publish-to-pypi.yml
- − .travis.yml
- ChangeLog
- INSTALL.md
- MACS2/Constants.py
- − MACS2/IO/BedGraph.c
- − MACS2/IO/BedGraphIO.c
- − MACS2/IO/CallPeakUnit.c
- − MACS2/IO/FixWidthTrack.c
- − MACS2/IO/PairedEndTrack.c
- − MACS2/IO/Parser.c
- − MACS2/IO/PeakIO.c
- − MACS2/IO/ScoreTrack.c
- − MACS2/PeakDetect.c
- − MACS2/PeakModel.c
- − MACS2/Pileup.c
- − MACS2/Prob.c
- − MACS2/Signal.c
- − MACS2/Statistics.c
- MANIFEST.in
- README.md
- pyproject.toml
- requirements.txt
- setup.py


Changes:

=====================================
.github/workflows/build-and-test-MACS2-macos12.yml
=====================================
@@ -0,0 +1,56 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: MACS2 Testing MacOS 12
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: macos-12
+    name: Build on MacOS 12 with Python 3.11
+    steps:
+      - name: Checkout MACS
+        uses: actions/checkout at v3
+        with:
+          submodules: 'true'
+      - name: Cache pip
+        uses: actions/cache at v3
+        with:
+          # This path is specific to Ubuntu
+          path: ~/.cache/pip
+          # Look to see if there is a cache hit for the corresponding requirements file
+          key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
+          restore-keys: |
+            ${{ runner.os }}-pip-
+            ${{ runner.os }}-        
+      - name: Setup venv
+        run: |
+          # create venv
+          python3 -m venv macs2venv
+      - name: Install dependencies
+        run: |
+          # make sure pip is the lastest
+          source macs2venv/bin/activate
+          python3 -m pip install --upgrade pip
+          pip3 install pytest
+          if [ -f requirements.txt ]; then pip3 install --upgrade -r requirements.txt; fi
+      - name: Install MACS
+        run: |
+          # we use pip install instead of old fashion setup.py install
+          source macs2venv/bin/activate
+          pip install .
+      - name: Test with pytest
+        run: |
+          source macs2venv/bin/activate
+          pytest --runxfail && cd test && ./cmdlinetest macs2test
+      - name: Build sdist
+        run: |
+          source macs2venv/bin/activate
+          python setup.py sdist
+      - name: Archive sdist
+        uses: actions/upload-artifact at v3
+        with:
+          name: sdist file
+          path: |
+            dist/*.tar.gz


=====================================
.github/workflows/build-and-test-MACS2-non-x64.yml
=====================================
@@ -0,0 +1,72 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: MACS2 Testing non x64
+
+on: [push, pull_request]
+
+jobs:
+  build_job:
+    runs-on: ubuntu-20.04
+    name: Build on ${{ matrix.arch }}
+    strategy:
+      matrix:
+        include:
+          - arch: armv7
+            distro: bullseye
+          - arch: aarch64
+            distro: bullseye
+          - arch: ppc64le
+            distro: bullseye
+          - arch: s390x
+            distro: bullseye
+    steps:
+      - name: Checkout MACS
+        uses: actions/checkout at v3
+        with:
+          submodules: 'true'
+      - name: Set up arch and run (bullseye Python 3.9)
+        uses: uraimo/run-on-arch-action at v2
+        id: build
+        with:
+          arch: ${{ matrix.arch }}
+          distro: ${{ matrix.distro }}
+
+          githubToken: ${{ github.token }}
+
+          # The shell to run commands with in the container
+          shell: /bin/bash
+
+          # Mount the current working directory (with checked-out codes) as /MACS3 in the container
+          dockerRunArgs: |
+            -v "${PWD}:/MACS2" -u macs2
+
+          # Create an artifacts directory on runner
+
+          # Install some dependencies in the container. This speeds up builds if
+          # you are also using githubToken. Any dependencies installed here will
+          # be part of the container image that gets cached, so subsequent
+          # builds don't have to re-install them. The image layer is cached
+          # publicly in your project's package repository, so it is vital that
+          # no secrets are present in the container state or logs.
+          install: |
+            useradd -m macs2
+            mkdir -p /MACS2
+            chown -R macs2:macs2 /MACS2
+            # install dependencies
+            apt-get update -qq -y
+            apt-get install apt-utils
+            apt-get install -yq libblas3 liblapack3 libblas-dev liblapack-dev
+            apt-get install -yq python3 python3-pip python3-wheel
+            apt-get install -yq procps zlib1g zlib1g-dev gfortran
+          run: |
+            echo `uname -a`
+            cd /home/macs2/
+            cp -r /MACS2 .
+            cd MACS2
+            export PATH="/home/macs2/.local/bin:${PATH}"
+            pip3 install --no-cache-dir --user --upgrade pip
+            pip3 install --user --upgrade -r requirements.txt --no-cache-dir
+            pip3 install --user .  --no-cache-dir
+            # run test
+            pytest --runxfail && cd test && ./cmdlinetest macs2


=====================================
.github/workflows/build-and-test-MACS2-x64.yml
=====================================
@@ -0,0 +1,59 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: MACS2 Testing CI x64
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-20.04
+    strategy: 
+      matrix: 
+        python-version: [3.7, 3.8, 3.9, 3.10.7, 3.11]
+        arch: ['x64']
+    name: Build on x64 with Python ${{ matrix.python-version }}
+    steps:
+      - name: Checkout MACS
+        uses: actions/checkout at v3
+        with:
+          submodules: 'true'
+          ref: macs_v2
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python at v3
+        with:
+          python-version: ${{ matrix.python-version }}
+          architecture: ${{ matrix.arch }}
+      - name: Cache pip
+        uses: actions/cache at v3
+        with:
+          # This path is specific to Ubuntu
+          path: ~/.cache/pip
+          # Look to see if there is a cache hit for the corresponding requirements file
+          key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
+          restore-keys: |
+            ${{ runner.os }}-pip-
+            ${{ runner.os }}-        
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install pytest
+          if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
+      - name: Install MACS
+        run: |
+          pip install .
+      - name: Test with pytest
+        run: |
+          pytest --runxfail
+          cd test
+          ./cmdlinetest macs2
+          cd ..
+      - name: Build sdist
+        run: |
+          python setup.py sdist
+      - name: Archive sdist
+        uses: actions/upload-artifact at v3
+        with:
+          name: sdist file
+          path: |
+            dist/*.tar.gz


=====================================
.github/workflows/publish-to-pypi.yml
=====================================
@@ -0,0 +1,36 @@
+# This workflows will upload a Python Package using Twine when a release is created
+# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
+
+name: MACS2 Upload to PYPI
+
+on:
+  release:
+    types: [created]
+
+jobs:
+  deploy:
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Check out MACS2 with submodules
+      uses: actions/checkout at v3 # does macs2 have actions set up ...?
+      with:
+        submodules: 'true'
+    - name: Set up Python
+      uses: actions/setup-python at v3 #does macs2 have actions set up ... ?
+      with:
+        python-version: '3.11'
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
+        # setuptools, wheel and twine are needed to upload to pypi
+        pip install setuptools wheel twine
+    - name: Build and publish
+      env:
+        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+      run: |
+        python setup.py sdist
+        twine upload dist/*
+        


=====================================
.travis.yml deleted
=====================================
@@ -1,62 +0,0 @@
-language: python
-os: linux
-dist: bionic
-jobs:
-  include:
-    # i386: Intel 32-bit
-    # Python is determined by test/Dockerfile
-    # Since the docker uses default bionic, python 3.6 is used for this test.
-    - name: i386_py3.6
-      language: shell
-      install: |
-        docker run --rm --privileged multiarch/qemu-user-static --reset -p yes &&
-          docker build --rm --build-arg BASE_IMAGE="i386/ubuntu:bionic" -t macs -f test/Dockerfile .
-      script: |
-        docker run --rm -t macs bash -cx "pytest --runxfail && cd test && ./cmdlinetest macs2"
-    - name: amd64_py3.8
-      arch: amd64
-      python: 3.8
-    - name: amd64_py3.7
-      arch: amd64
-      python: 3.7
-    - name: amd64_py3.6
-      arch: amd64
-      python: 3.6      
-    - name: arm64_py3.8
-      arch: arm64
-      python: 3.8
-    - name: ppc64le_py3.8
-      arch: ppc64le
-      python: 3.8     
-    - name: s390x_py3.8
-      arch: s390x
-      python: 3.8
-  allow_failures:
-  #  - name: i386_py3.6
-    # this one may time out depending on the load on travis CI
-    - name: arm64_py3.8
-  #  - name: ppc64le_py3.8
-  #  - name: s390x_py3.8
-  fast_finish: true
-install:
-  - pip install --upgrade pip
-  - pip install --upgrade -r requirements.txt --no-cache-dir
-  - python setup.py install
-script:
-  - pytest --runxfail
-  - cd test
-  - ./cmdlinetest macs2
-  - cd ..
-deploy:
-  provider: pypi
-  username:
-    secure: lguBZWd+H2u4jqWgq4xFrlDnTniJtGm4eGddGpXGWFrhX4qno2YdJMd5S6L+FVUezrwTXLptyWcKSrJRcddAzR5vvXIX0ibpMThiVjXRrQGtlGkuffAXjiCleIk0QxsOafTElHW4zzGXf3us8ECLcdHwcJdJOjJPUSVLjeWJsTVPJqxySq1eWT9I7E8Wh0yeaZ/WiA3Val5Brc7B6P0ZpDnS5Y0bpSDgWb4uCvbkCJhf74Owj7D2yrbrsfM6H/QZRR2zr97d4w8/mserFQSIdM5GnhNyxbWrtgVUDIoNB4o7X+2og+jfvZUEaZu0xEtST39W2Z89++5NxRXYrn7t3Zsr8+V2+mnspQD1ktdeCJtzrgIcuGtLzVIEVS0vu+358qGXaCnjjxxlGymG8sodsUc0c51GfcPxeqla9aYEgasUATRA43NGFBQNZrusN2Ov+bPKST37lVVRJXEVUtYRVcrJz8AJN1Gdim12luQDHBfhjBq2w4Rl2aBBUDWkL5KuE5TQffdzpIqp/47QKVgxqACUG7CJElNwhHoyHP6GhyMnGHMC4hl4FidqXdq9qJOJtZbKJU/kGYPpclnMa82GU9nYb6JEesItVWAtudlbU7Df4X/JHxUfi0E3VgkrZG6XDHFAkU4LBBUBaeMhP4UVlBMyjv6TNhd0LWBqA17Y1zk=
-  password:
-    secure: NBq2RSTUjhQf4GlxSGg1e9P8vIQrtVskhOc1j6mIYE1zRGEIQFlrujE11+KDrGBoD7KAtWS4HjTFZEctI5nI+YYrZOg0Fu5XgDHD7rRD10qp3/Ipmack3i4pl6JDyyOiIJVmt0+IcN4+fxfIsTrs0XRLSGDw1GaO91V05RpY5GJZ5+crXaUQKsFzvwFgznnqQPK2dY/NsqC63TkYvpiiI4Sn5Eb78XW8kjtEzM84bYFcwMWofib75v8qqRGEabHxUBlXBfWOoDS78T58MdZK+DQ/HJT9XFU0yF1yJ2IhMOHUxnvH2E/nKuLwA3fUBXsPpHFmsbRhgKlCyPUhqjKAhsRyZHqfU6BaF7yJOejeCwbcY6EzQzwQvGr4UQUG6EX49YskKYrwb7IXqC8Y3OjD8maUMdpWU249dPwqDvkwjASa8FlN6LIxJ28f0qd7y1EDFZwM12kS0pdNimxTmxEMYBy76jBxOKDG3Hr349E6Q67trVktbNfp0PdUFVSWqxeJrdujl38w4h07hPKTESugqasPVO/gaY+8+f+xrB7F3TXLDSN+5Dcr9srVX4V2Z72rJtoxrggMbY/n8RUXNC1+45QnRAv/6iLoingtlOwo3p0xA25J7kl7akWqPaP2MwQ+eoPvMgZwrS/S+5Q+7t/rwZn0SkjjSJZIIwB++Ccjbfc=
-  on:
-    repo: taoliu/MACS
-    tags: true
-    condition: $TRAVIS_JOB_NAME =~ ^amd64_py3.8$
-  skip_existing: true
-  distributions: sdist
-


=====================================
ChangeLog
=====================================
@@ -1,3 +1,27 @@
+2020-07-21  Tao Liu  <vladimir.liu at gmail.com>
+   MACS version 2.2.9.1
+   
+   * Bug fix:
+     
+    Cython has a major upgrade to 3.0, and can't work directly with
+    MACS2 codes, so we changed the requirement for Cython to 0.29.*.
+    
+    Python support has been changed to 3.7 to 3.11. Numpy >=0.19.
+    
+    We tested MACS2 on Mac OS12 through Github Actions as well.
+    
+    Thank @jemajet! #569
+    
+2023-05-12 Philippa Doherty <philippa.doherty at roswellpark.org>
+	MACS version 2.2.8
+
+	* Bug fix:
+
+	MACS2 typo in `setup.py`: `numpy>=>=1.17` -> `numpy>=1.17`
+	PR #543, issues #535, #541, #544
+
+	Now test on and support Python 3.6/3.7/3.8/3.9/3.10/3.11
+
 2020-04-11  Tao Liu  <vladimir.liu at gmail.com>
 	MACS version 2.2.7.1
 


=====================================
INSTALL.md
=====================================
@@ -1,14 +1,14 @@
 # INSTALL Guide For MACS
-Time-stamp: <2019-12-12 13:26:11 taoliu>
+Time-stamp: <2023-07-20 10:26:11 taoliu>
 
 Please check the following instructions to complete your installation.
 
 ## Prerequisites
 
-MACS v2.2.x requires Python3. We have tested MACS in Python3.6, 3.7
-and 3.8. 
+MACS v2.2.x requires Python3. We have tested MACS in Python 3.7 to
+3.11.
 
-MACS also requires [Numpy](http://www.scipy.org/Download) (>=1.17).
+MACS also requires [Numpy](http://www.scipy.org/Download) (>=1.19).
 
 GCC is required to compile `.c` codes in MACS v2 package, and python
 header files are needed. If you are using Mac OSX, I recommend you
@@ -16,10 +16,11 @@ install Xcode; if you are using Linux, you need to make sure
 `python-dev` package is installed -- the actual package name depends
 on the Linux OS distribution, you are using.
 
-[Cython](http://cython.org/) is **NOT** required although most of MACS
-codes are written in Cython. But if you plan to generate `.c` files
-from `.pyx` by yourself, you can install Cython (>=0.29), then use
-`setup.py` script.
+[Cython](http://cython.org/) is required to translate .pyx codes to .c
+code. The version of Cython has to be >=0.29 but lower than 3.0.
+
+If you use `pip` to install MACS2, the installer script will check the
+dependencies and install them when necessary.
 
 ## Prepare a virtual Python environment 
 
@@ -44,7 +45,7 @@ as described before, your `pip` command will install everything under
 the folder you specified previously through `python3 -m env` command.
 
 Then under the command line, type `pip install macs2`. PyPI will
-install Numpy automatically if it is absent.
+install Cython and Numpy automatically when necessary.
 
 To upgrade MACS2, type `pip install --upgrade macs2`. It will check
 currently installed MACS2, compare the version with the one on PyPI
@@ -62,37 +63,20 @@ kind of Supper Cow Powers.
 
 ## Install from source
 
-MACS uses Python's [setuptools](https://setuptools.readthedocs.io) for
-source code installations. To install a source distribution of MACS,
-unpack the distribution tarball, or clone Git repository with `git
-clone git at github.com:taoliu/MACS.git`. Go to the directory where you
-unpacked MACS, and simply run the install script:
+MACS uses `pip` for source code installations. To install a source 
+distribution of MACS, unpack the distribution tarball. Go to the 
+directory where you cloned MACS from github, and simply run the
+install command:
 
- `$ python setup.py install`
+ `$ pip install .`
 
 By default, the script will install python library and executable
 codes according to the environment. When you run the command under
-virtualenv, the script will install to the virtual environment
-instead. When you run it without virtual environment, you may need to
-be root or administrator of the machine so as to complete the
-installation. Please contact the system administrator if you want
-their help. If you need to provide a nonstandard install prefix, or
-any other nonstandard options, you can provide many command line
-options to the install script. Use the `--help` option to see a brief
-list of available options:
-
- `$ python setup.py --help`
-
-For example, if I want to install everything under my own HOME
-directory, use this command:
-
- `$ python setup.py install --prefix /home/taoliu/`
-
-As mentioned in *Prerequisites*, you don't need to install Cython in
-order to install MACS. When Cython is available, this setup script
-will regenerate C codes from Pyx codes when necessary. When Cython is
-not available, this setup script will just use the C codes included in
-the release package (or your Github clone) for installation.
+virtualenv or conda environment, the script will install to the virtual
+environment instead. When you run the command without virtual environment, 
+you may need to be root or administrator of the machine so as to 
+complete the installation. Please contact the system administrator
+if you want their help. 
 
 ## Configure environment variables
 


=====================================
MACS2/Constants.py
=====================================
@@ -1,4 +1,4 @@
-MACS_VERSION = "2.2.7.1"
+MACS_VERSION = "2.2.9.1"
 FILTERDUP_VERSION = "1.0.0 20140616"
 RANDSAMPLE_VERSION = "1.0.0 20120703"
 MAX_PAIRNUM = 1000


=====================================
MACS2/IO/BedGraph.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/BedGraphIO.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/CallPeakUnit.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/FixWidthTrack.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/PairedEndTrack.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/Parser.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/PeakIO.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/IO/ScoreTrack.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/PeakDetect.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/PeakModel.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/Pileup.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/Prob.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/Signal.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MACS2/Statistics.c deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
MANIFEST.in
=====================================
@@ -1,6 +1,7 @@
 include README.md LICENSE ChangeLog INSTALL.md MANIFEST.in setup.py bin/macs2 MACS2/cPosValCalculation.c
 recursive-include MACS2 *.py *.pyx *.pxd *.c *.h
 exclude .gitignore .travis.yml
+global-exclude .ipynb_checkpoints/*
 prune test
 prune .github
 prune DOCKER


=====================================
README.md
=====================================
@@ -28,7 +28,30 @@ applied to any "DNA enrichment assays" if the question to be asked is
 simply: *where we can find significant reads coverage than the random
 background*.
 
-## Recent Changes for MACS (2.2.7.1)
+*Note: new development on MACS has been moved to MACS3 repository,
+we will only fix installation issues on MACS2.*
+
+## Recent Changes for MACS (2.2.9.1)
+
+### 2.2.9.1
+    * Bug fix:
+     
+    Cython has a major upgrade to 3.0, and can't work directly with
+    MACS2 codes, so we changed the requirement for Cython to 0.29.*.
+    
+    Python support has been changed to 3.7 to 3.11. Numpy >=0.19.
+    
+    We tested MACS2 on Mac OS12 through Github Actions as well.
+    
+    Thank @jemajet! #569
+
+### 2.2.8
+    * Bug fix:
+
+	MACS2 typo in 'setup.py': 'numpy>=>=1.17' -> 'numpy>=1.17'
+	PR #543, issues #535, #541, #544
+
+	Now test on and support Python 3.6/3.7/3.8/3.9/3.10/3.11
 
 ### 2.2.7.1
 	* hotfix: 
@@ -108,7 +131,11 @@ background*.
 
 ## Install
 
-Please check the file 'INSTALL.md' in the distribution.
+Please check the file 'INSTALL.md' in the distribution. In general,
+you can install through PyPI as `pip install macs2`. To use virtual 
+environment is highly recommended. Or you can install after
+unzipping the released package downloaded from Github, then use 
+`pip install .` command.
 
 ## Usage
 
@@ -123,7 +150,7 @@ Control.bam -f BAM -g hs -n test -B -q 0.01`
 Example for broad peak calling: `macs2 callpeak -t ChIP.bam -c
 Control.bam --broad -g hs --broad-cutoff 0.1`
 
-There are twelve functions available in MAC2S serving as sub-commands.
+There are twelve functions available in MACS2 serving as sub-commands.
 
 Subcommand | Description
 -----------|----------


=====================================
pyproject.toml
=====================================
@@ -1,2 +1,2 @@
 [build-system]
-requires=['pip', 'setuptools>=41.2', 'numpy>=1.17', 'cython>=0.29', 'wheel' ]
+requires=['pip>=21', 'setuptools>=41.2', 'numpy>=1.19', 'Cython~=0.29', 'wheel' ]


=====================================
requirements.txt
=====================================
@@ -1,6 +1,4 @@
-numpy>=1.17
-cython>=0.29
+numpy>=1.19
+cython~=0.29
 pytest>=4.6
-pytest-cov>=2.8
-codecov>=2.0
 setuptools>=41.2


=====================================
setup.py
=====================================
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# Time-stamp: <2019-12-12 13:04:02 taoliu>
+# Time-stamp: <2023-07-20 09:58:20 Tao Liu>
 
 """Description: 
 
@@ -12,43 +12,55 @@ the distribution).
 
 import sys
 import os
+import re
 from setuptools import setup, Extension
-from distutils.version import LooseVersion
+from Cython.Build import cythonize
 import subprocess
+import sysconfig
+import numpy
 
-numpy_requires = '>=1.17'
-install_requires = [f"numpy>={numpy_requires}",]
+install_requires = [ "numpy>=1.19",
+                     "cykhash>=2.0,<3.0",
+                     "Cython~=0.29" ]
 
-def main():
-    if float(sys.version[:3])<3.6:
-        sys.stderr.write("CRITICAL: Python version must >= 3.6!\n")
-        sys.exit(1)
+exec(open("MACS2/Constants.py").read())
+
+# classifiers
+classifiers =[\
+              'Development Status :: 5 - Production/Stable',
+              'Environment :: Console',
+              'Intended Audience :: Developers',
+              'Intended Audience :: Science/Research',              
+              'License :: OSI Approved :: BSD License',
+              'Operating System :: MacOS :: MacOS X',
+              'Operating System :: POSIX',
+              'Topic :: Scientific/Engineering :: Bio-Informatics',
+              'Programming Language :: Python :: 3.7',
+              'Programming Language :: Python :: 3.8',              
+              'Programming Language :: Python :: 3.9',
+              'Programming Language :: Python :: 3.10',
+              'Programming Language :: Python :: 3.11',              	      
+              'Programming Language :: Cython',
+              ]
 
-    cwd = os.path.abspath(os.path.dirname(__file__))
+install_requires = [ "numpy>=1.19",
+                     "Cython~=0.29" ]
 
-    # install required numpy
-    p = subprocess.call([sys.executable, "-m", 'pip', 'install', f'numpy{numpy_requires}'],cwd=cwd)
-    if p != 0:
-        # Could be due to a too old pip version and build isolation, check that
-        try:
-            # Note, pip may not be installed or not have been used
-            import pip
-            if LooseVersion(pip.__version__) < LooseVersion('18.0.0'):
-                raise RuntimeError("Installing requirements failed. Possibly due "
-                                   "to `pip` being too old, found version {}, "
-                                   "needed is >= 18.0.0.".format(pip.__version__))
-            else:
-                raise RuntimeError("Installing requirements failed!")
-        except ImportError:
-            raise RuntimeError("Installing requirement failed! `pip` has to be installed!")
+tests_requires = [ 'pytest' ]
+
+def main():
+    if sys.version_info < (3,7):
+        sys.stderr.write("CRITICAL: Python version must >= 3.7!\n")
+        sys.exit(1)
         
-    from numpy import get_include as numpy_get_include
-    numpy_include_dir = [numpy_get_include()]
+    # NumPy include dir
+    numpy_include_dir = [ numpy.get_include() ]
         
     # I intend to use -Ofast, however if gcc version < 4.6, this option is unavailable so...
     extra_c_args = ["-w","-O3","-ffast-math","-g0"] # for C, -Ofast implies -O3 and -ffast-math
 
-    ext_modules = [Extension("MACS2.Prob", ["MACS2/Prob.pyx"], libraries=["m"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args ),
+    ext_modules = [ \
+                   Extension("MACS2.Prob", ["MACS2/Prob.pyx"], libraries=["m"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args ),
                    Extension("MACS2.IO.Parser",["MACS2/IO/Parser.pyx"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args),
                    Extension("MACS2.Pileup", ["MACS2/Pileup.pyx","MACS2/cPosValCalculation.c"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args ),
                    Extension("MACS2.PeakModel", ["MACS2/PeakModel.pyx"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args),
@@ -61,42 +73,29 @@ def main():
                    Extension("MACS2.IO.BedGraph", ["MACS2/IO/BedGraph.pyx"], libraries=["m"], extra_compile_args=extra_c_args),
                    Extension("MACS2.IO.ScoreTrack", ["MACS2/IO/ScoreTrack.pyx"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args ),
                    Extension("MACS2.IO.CallPeakUnit", ["MACS2/IO/CallPeakUnit.pyx"], include_dirs=numpy_include_dir, extra_compile_args=extra_c_args),
-                   #Extension("MACS2.Statistics", ["MACS2/Statistics.pyx"], libraries=["m"], include_dirs=["MACS2/",numpy_get_include()], extra_compile_args=extra_c_args),
-    ]
+                  ]
 
     with open("README.md", "r") as fh:
         long_description = fh.read()
         
     setup(name="MACS2",
-          version="2.2.7.1",
+          version=MACS_VERSION,
           description="Model Based Analysis for ChIP-Seq data",
           long_description = long_description,
           long_description_content_type="text/markdown",
           author='Tao Liu',
           author_email='vladimir.liu at gmail.com',
-          url='http://github.com/taoliu/MACS/',
+          url = 'http://github.com/macs3-project/MACS/',
           package_dir={'MACS2' : 'MACS2'},
           packages=['MACS2', 'MACS2.IO'],
           package_data={'MACS2':['*.pxd']},
           scripts=['bin/macs2', ],
-          classifiers=[
-              'Development Status :: 5 - Production/Stable',
-              'Environment :: Console',
-              'Intended Audience :: Developers',
-              'Intended Audience :: Science/Research',              
-              'License :: OSI Approved :: BSD License',
-              'Operating System :: MacOS :: MacOS X',
-              'Operating System :: POSIX',
-              'Topic :: Scientific/Engineering :: Bio-Informatics',
-              'Programming Language :: Python :: 3.6',
-              'Programming Language :: Python :: 3.7',
-              'Programming Language :: Python :: 3.8',              
-              'Programming Language :: Cython',
-              ],
+          classifiers=classifiers,
           install_requires=install_requires,
-          setup_requires=install_requires,          
-          python_requires='>=3.6',
-          ext_modules = ext_modules
+          setup_requires=install_requires,    
+          tests_require = tests_requires,
+          python_requires='>=3.7',
+          ext_modules = cythonize( ext_modules ),
           )
 
 if __name__ == '__main__':



View it on GitLab: https://salsa.debian.org/med-team/macs/-/commit/9388a902af97c63705bb16e2d78cf3f17b681ca0

-- 
View it on GitLab: https://salsa.debian.org/med-team/macs/-/commit/9388a902af97c63705bb16e2d78cf3f17b681ca0
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/20230809/b605dafb/attachment-0001.htm>


More information about the debian-med-commit mailing list