Skip to content

Commit 746cbcb

Browse files
committed
fix bdist_egg and bdist_wheel commands
1 parent 12dcb7e commit 746cbcb

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
/dist
55
/build
66
/*.egg-info
7+
Cargo.lock
8+
/example/extensions/target/
9+
/example/*.egg-info

CHANGES.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CHANGES
2+
=======
3+
4+
0.2 (2017-03-08)
5+
----------------
6+
7+
- Fix bdist_egg and bdist_wheel commands
8+
9+
10+
0.1 (2017-03-08)
11+
----------------
12+
13+
- Initial release

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
version = '0.1'
3+
version = '0.2'
44

55

66
setup(
@@ -11,7 +11,8 @@
1111
url="https://github.com/fafhrd91/setuptools-rust",
1212
keywords='distutils setuptools rust',
1313
description="Setuptools rust extension plugin",
14-
long_description=open('README.rst').read(),
14+
long_description='\n\n'.join(
15+
(open('README.rst').read(), open('CHANGES.rst').read())),
1516
license='MIT',
1617
packages=['setuptools_rust'],
1718
zip_safe=True,

setuptools_rust/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@
99
from distutils.command.build import build as Build
1010
from distutils.command.build_ext import build_ext
1111
from distutils.command.install_lib import install_lib
12-
from setuptools import setup, Extension
13-
from setuptools.command import develop
12+
from setuptools import dist, setup, Extension
13+
from setuptools.command import develop, bdist_egg
1414

1515
__all__ = ('RustExtension', 'build_rust')
1616

1717

1818
# allow to use 'rust_extensions' parameter for setup() call
1919
Distribution.rust_extensions = ()
2020

21+
def has_ext_modules(self):
22+
return (self.ext_modules and len(self.ext_modules) > 0 or
23+
self.rust_extensions and len(self.rust_extensions) > 0)
24+
25+
Distribution.has_ext_modules = has_ext_modules
26+
#dist.Distribution.has_ext_modules = has_ext_modules
2127

2228
# add support for build_rust sub0command
2329
def has_rust_extensions(self):

0 commit comments

Comments
 (0)