Skip to content

Commit

Permalink
Prepare setup.py for SDIST building
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiggins committed Nov 3, 2016
1 parent 72fe538 commit 52f4c5f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include pyagg/*.hxx
graft agg-svn/agg-2.4/include
graft agg-svn/agg-2.4/font_freetype
graft agg-svn/agg-2.4/font_win32_tt
9 changes: 7 additions & 2 deletions pyagg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,13 @@ def configuration(parent_package='', top_path=None):
'extra_link_args': extra_link_args
}

if cythonize is not None:
# Run Cython first
# Installing from an SDIST is special...
cpp_pyagg = op.join('pyagg', '_pyagg.cpp')
pyx_pyagg = op.join('pyagg', '_pyagg.pyx')
is_sdist = op.exists(cpp_pyagg) and not op.exists(pyx_pyagg)

# Run Cython first if this is a development version
if not is_sdist and cythonize is not None:
cythonize(pyagg_cython_source, language='c++',
compile_time_env=cython_compile_env)

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration


# Disable text rendering with this option
if '--no-text-rendering' in sys.argv:
del sys.argv[sys.argv.index('--no-text-rendering')]
Expand Down Expand Up @@ -56,14 +55,16 @@ def configuration(parent_package='', top_path=None):
name='pyagg',
configuration=configuration,
license='MIT',
version='0.0.1',
version='0.1.0',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: C++',
'Programming Language :: Cython',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
'Operating System :: Microsoft :: Windows',
Expand Down

0 comments on commit 52f4c5f

Please sign in to comment.