Skip to content

Commit 7e3f9a1

Browse files
authored
Improve package layout (open-telemetry#37)
1 parent 0bf0fad commit 7e3f9a1

File tree

16 files changed

+109
-4
lines changed

16 files changed

+109
-4
lines changed

opentelemetry-api/setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
base_dir = os.path.dirname(__file__)
1919

2020
package_info = {}
21-
with open(os.path.join(base_dir, "opentelemetry", "internal", "version.py")) as f:
21+
with open(os.path.join(base_dir, "src", "opentelemetry", "internal", "version.py")) as f:
2222
exec(f.read(), package_info)
2323

2424
setuptools.setup(
@@ -45,7 +45,8 @@
4545
],
4646
extras_require={},
4747
license="Apache-2.0",
48-
packages=setuptools.find_namespace_packages(include=["opentelemetry.*"]),
48+
package_dir={"": "src"},
49+
packages=setuptools.find_namespace_packages(where="src"),
4950
url="https://github.com/open-telemetry/opentelemetry-python/tree/master/opentelemetry-api",
5051
zip_safe=False,
5152
)

opentelemetry-sdk/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
## Unreleased
4+
- Initial release

opentelemetry-sdk/README.rst

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
OpenTelemetry Python SDK
2+
============================================================================
3+
4+
|pypi|
5+
6+
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-sdk.svg
7+
:target: https://pypi.org/project/opentelemetry-sdk/
8+
9+
Installation
10+
------------
11+
12+
::
13+
14+
pip install opentelemetry-sdk
15+
16+
References
17+
----------
18+
19+
* `OpenTelemetry Project <https://opentelemetry.io/>`_

opentelemetry-sdk/setup.py

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2019, OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
import setuptools
17+
18+
base_dir = os.path.dirname(__file__)
19+
20+
package_info = {}
21+
with open(os.path.join(base_dir, "src", "opentelemetry", "sdk", "version.py")) as f:
22+
exec(f.read(), package_info)
23+
24+
setuptools.setup(
25+
name="opentelemetry-sdk",
26+
version=package_info["__version__"], # noqa
27+
author="OpenTelemetry Authors",
28+
author_email="[email protected]",
29+
classifiers=[
30+
"Development Status :: 3 - Alpha",
31+
"Intended Audience :: Developers",
32+
"License :: OSI Approved :: Apache Software License",
33+
"Programming Language :: Python",
34+
"Programming Language :: Python :: 3",
35+
"Programming Language :: Python :: 3.4",
36+
"Programming Language :: Python :: 3.5",
37+
"Programming Language :: Python :: 3.6",
38+
"Programming Language :: Python :: 3.7",
39+
],
40+
description="OpenTelemetry Python SDK",
41+
include_package_data=True,
42+
long_description=open("README.rst").read(),
43+
install_requires=[
44+
],
45+
extras_require={},
46+
license="Apache-2.0",
47+
package_dir={"": "src"},
48+
packages=setuptools.find_namespace_packages(where="src"),
49+
url="https://github.com/open-telemetry/opentelemetry-python/tree/master/opentelemetry-sdk",
50+
zip_safe=False,
51+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2019, OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from .version import __version__
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2019, OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
__version__ = "0.1.dev0"

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ deps =
88
py37-mypy: mypy
99

1010
commands =
11-
py37-lint: pylint opentelemetry-api/opentelemetry/
12-
py37-mypy: mypy opentelemetry-api/opentelemetry/
11+
py37-lint: pylint opentelemetry-api/src/opentelemetry/
12+
py37-mypy: mypy opentelemetry-api/src/opentelemetry/

0 commit comments

Comments
 (0)