Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building from a Pipfile or requirements.txt #7

Merged
merged 2 commits into from
Dec 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,11 @@ environment:
- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.6"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python33"
PYTHON_VERSION: "3.5.3"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.13"
PYTHON_ARCH: "64"

# - PYTHON: "C:\\Python33-x64"
# PYTHON_VERSION: "3.4.6"
# PYTHON_ARCH: "64"
# WINDOWS_SDK_VERSION: "v7.1"

# - PYTHON: "C:\\Python34-x64"
# PYTHON_VERSION: "3.5.3"
# PYTHON_ARCH: "64"
# WINDOWS_SDK_VERSION: "v7.1"

matrix:
fast_finish: true

Expand Down
18 changes: 14 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/usr/bin/env python
from setuptools import setup, find_packages, Extension # This setup relies on setuptools since distutils is insufficient and badly hacked code
import numpy as np
from setuptools.command.build_ext import build_ext as _build_ext

class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())

# Check if cython exists, then use it. Otherwise compile already cythonized cpp file
have_cython = False
Expand All @@ -17,11 +25,12 @@
sources=['pyLandau/cpp/pylandau.cpp'],
language="c++")]

version = '2.1.0'
version = '2.1.1'
author = 'David-Leon Pohl'
author_email = 'pohl@physik.uni-bonn.de'

install_requires = ['cython', 'numpy']
install_requires = ['cython', 'numpy'] # scipy
setup_requires = ['numpy', 'cython']

setup(
name='pylandau',
Expand All @@ -34,12 +43,13 @@
maintainer=author,
author_email=author_email,
maintainer_email=author_email,
cmdclass={'build_ext':build_ext},
install_requires=install_requires,
setup_requires=setup_requires,
packages=find_packages(),
include_package_data=True, # accept all data files and directories matched by MANIFEST.in or found in source control
package_data={'': ['README.*', 'VERSION'], 'docs': ['*'], 'examples': ['*']},
ext_modules=cpp_extension,
include_dirs=[np.get_include()],
keywords=['Landau', 'Langau', 'PDF'],
platforms='any'
)