Skip to content

Commit

Permalink
Merge pull request #16 from stephenhky/setupupdate
Browse files Browse the repository at this point in the history
Removal of `numpy` and `Cython` dependencies before installation
  • Loading branch information
stephenhky authored Oct 4, 2022
2 parents 6a1a1c4 + ed9ae05 commit 2c591e4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ jobs:
py36:
<<: *shared
docker:
- image: circleci/python:3.6
- image: cimg/python:3.6

py37:
<<: *shared
docker:
- image: circleci/python:3.7
- image: cimg/python:3.7

py38:
<<: *shared
docker:
- image: circleci/python:3.8
- image: cimg/python:3.8

py39:
<<: *shared
docker:
- image: circleci/python:3.9
- image: cimg/python:3.9

py310:
<<: *shared
docker:
- image: circleci/python:3.10
- image: cimg/python:3.10

workflows:
version: 2
Expand Down
7 changes: 7 additions & 0 deletions FORTRANNOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Fortran and Cython Modules

This package is no longer using Fortran and Cython modules at the same time. But in case you want
one needs to know how to link them, here are some of the links:

- [Link 1](https://stackoverflow.com/questions/7932028/setup-py-for-packages-that-depend-on-both-cython-and-f2py?rq=1)
- [Link 2](https://stackoverflow.com/questions/7932028/setup-py-for-packages-that-depend-on-both-cython-and-f2py)
4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include README.md
include requirements.txt
include graphflow/pagerank/f90pagerank.f90
include graphflow/pagerank/f90pagerank.pyf
include pyproject.toml
include graphflow/pagerank/cpagerank.pyx
include graphflow/pagerank/cpagerank.c

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ After ensuring they have been installed, type the following to install `graphflo

# News

* 12/31/2921: `graphflow` 0.4.3 released.
* 10/04/2022: `graphflow` 0.4.4 released.
* 12/31/2021: `graphflow` 0.4.3 released.
* 12/15/2021: `graphflow` 0.4.2 released.
* 04/19/2021: `graphflow` 0.4.1 released.
* 04/10/2021: `graphflow` 0.4.0 released.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# The short X.Y version.
version = u'0.4'
# The full version, including alpha/beta/rc tags.
release = u'0.4.3'
release = u'0.4.4'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
20 changes: 20 additions & 0 deletions doc/source/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
News
====

* 10/04/2022: `graphflow` 0.4.4 released.
* 12/31/2021: `graphflow` 0.4.3 released.
* 12/15/2021: `graphflow` 0.4.2 released.
* 04/19/2021: `graphflow` 0.4.1 released.
* 04/10/2021: `graphflow` 0.4.0 released.
* 04/09/2020: `graphflow` 0.3.0 released.
Expand All @@ -16,6 +19,23 @@ News
What's New
----------

Release 0.4.4 (December 31, 2021)
---------------------------------

* No `numpy` and `Cython` dependencies before installation;
* Updated CircleCI pipeline.

Release 0.4.3 (December 31, 2021)
---------------------------------

* Remove Fortran.
* Support for Python 3.10.

Release 0.4.2 (December 15, 2021)
---------------------------------

* Support for Python 3.10.

Release 0.4.1 (April 19, 2021)
------------------------------

Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "Cython>=0.29", "numpy >= 1.18"]
19 changes: 4 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@

# must import thisfirst. Ref: # must import this. Ref: https://stackoverflow.com/questions/7932028/setup-py-for-packages-that-depend-on-both-cython-and-f2py?rq=1

# reference about how f2py and cython modules coexists:
# https://stackoverflow.com/questions/7932028/setup-py-for-packages-that-depend-on-both-cython-and-f2py

from setuptools import setup
import numpy as np
from Cython.Build import cythonize

try:
from Cython.Build import cythonize
dynprog_ext_modules = cythonize(['graphflow/pagerank/cpagerank.pyx'])
except ImportError:
from setuptools import Extension
dynprog_ext_modules = [Extension('graphflow.pagerank.cpagerank',
sources=['graphflow/pagerank/cpagerank.c'])]
dynprog_ext_modules = cythonize(['graphflow/pagerank/cpagerank.pyx'])


def readme():
Expand All @@ -26,7 +16,7 @@ def install_requirements():


setup(name='graphflow',
version="0.4.3",
version="0.4.4a1",
description="Algorithms for Graph Flow Analysis",
long_description="Numerical routines for analyzing data represented by graphs",
classifiers=[
Expand All @@ -51,8 +41,7 @@ def install_requirements():
'graphflow.pagerank',
'graphflow.simvoltage',
'graphflow.hits'],
package_data={'graphflow': ['pagerank/*.f90', 'pagerank/*.pyf',
'pagerank/*.c', 'pagerank/*.pyx'],
package_data={'graphflow': ['pagerank/*.c', 'pagerank/*.pyx'],
'test': ['*.csv']},
setup_requires=['numpy', 'Cython'],
install_requires=install_requirements(),
Expand Down

0 comments on commit 2c591e4

Please sign in to comment.