8000 [MRG+1] MAINT make it possible to use wheelhouse-uploader by ogrisel · Pull Request #4028 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] MAINT make it possible to use wheelhouse-uploader #4028

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

Merged
merged 1 commit into from
Mar 5, 2015
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
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ doctest-extension = rst
doctest-fixtures = _fixture
#doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE

[wheelhouse_uploader]
artifact_indexes=
# OSX wheels built by travis (only for specific tags):
# https://github.com/MacPython/scikit-learn-wheels
http://wheels.scipy.org
# Windows wheels buit by:
# https://ci.appveyor.com/project/sklearn-ci/scikit-learn/
http://windows-wheels.scikit-learn.org/

# Uncomment the following under windows to build using:
# http://sourceforge.net/projects/mingw/

Expand Down
30 changes: 20 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,20 @@
# We can actually import a restricted version of sklearn that
# does not need the compiled code
import sklearn

VERSION = sklearn.__version__

###############################################################################

# Optional setuptools features
# We need to import setuptools early, if we want setuptools features,
# as it monkey-patches the 'setup' function

# For some commands, use setuptools
SETUPTOOLS_COMMANDS = set([
'develop', 'release', 'bdist_egg', 'bdist_rpm',
'bdist_wininst', 'install_egg_info', 'build_sphinx',
'egg_info', 'easy_install', 'upload', 'bdist_wheel',
'--single-version-externally-managed',
])


if len(SETUPTOOLS_COMMANDS.intersection(sys.argv)) > 0:
if SETUPTOOLS_COMMANDS.intersection(sys.argv):
import setuptools
extra_setuptools_args = dict(
zip_safe=False, # the package can run out of an .egg file
Expand All @@ -64,8 +60,8 @@
else:
extra_setuptools_args = dict()

###############################################################################

# Custom clean command to remove build artifacts

class CleanCommand(Clean):
description = "Remove build artifacts from the source tree"
Expand All @@ -84,8 +80,22 @@ def run(self):
if dirname == '__pycache__':
shutil.rmtree(os.path.join(dirpath, dirname))

cmdclass = {'clean': CleanCommand}


# Optional wheelhouse-uploader features
# To automate release of binary packages for scikit-learn we need a tool
# to download the packages generated by travis and appveyor workers (with
# version number matching the current release) and upload them all at once
# to PyPI at release time.
# The URL of the artifact repositories are configured in the setup.cfg file.

WHEELHOUSE_UPLOADER_COMMANDS = set(['fetch_artifacts', 'upload_all'])
if WHEELHOUSE_UPLOADER_COMMANDS.intersection(sys.argv):
import wheelhouse_uploader.cmd
cmdclass.update(vars(wheelhouse_uploader.cmd))


###############################################################################
def configuration(parent_package='', top_path=None):
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
Expand Down Expand Up @@ -133,7 +143,7 @@ def setup_package():
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
cmdclass={'clean': CleanCommand},
cmdclass=cmdclass,
**extra_setuptools_args)

if (len(sys.argv) >= 2
Expand All @@ -143,7 +153,7 @@ def setup_package():
# For these actions, NumPy is not required.
#
# They are required to succeed without Numpy for example when
# pip is used to install Scikit when Numpy is not yet present in
# pip is used to install Scikit-learn when Numpy is not yet present in
# the system.
try:
from setuptools import setup
Expand Down
0