Skip to content

Commit

Permalink
Setup for building wheels
Browse files Browse the repository at this point in the history
A few things in this:
- Update README to have absolute links, rather than relative links for resolving on PyPI
- Cleanup requirements, getting rid of those pulled in by the ocs dependency
- Move testing requirements to separate requirements file (though still call recursively in old file)
- Fill out more info in setup.py and add pyproject.toml for builds
  • Loading branch information
BrianJKoopman committed Feb 2, 2022
1 parent accf1ba commit 608ac6d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 17 deletions.
20 changes: 15 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,23 @@ by `OCS`_.
Installation
------------

To install SOCS, clone the repository and install with `pip`:
Install and update with pip::

$ pip3 install -U socs

Installing from Source
``````````````````````

If you are considering contributing to SOCS, or would like to use the
development branch, you will want to install from source. To do so,
clone the repository and install using pip:

.. code-block:: bash
git clone https://github.com/simonsobs/socs.git
cd socs/
pip3 install -r requirements.txt .
pip3 install -r requirements.txt
pip3 install .
In order for OCS tools to find these agents, you must add the full
path to the agents directory, e.g. ``/home/simons/code/socs/agents/``,
Expand Down Expand Up @@ -93,17 +103,17 @@ The tests for SOCS are run using pytest, and should be run from the

For more details see `tests/README.rst <tests_>`_.

.. _tests: tests/README.rst
.. _tests: https://github.com/simonsobs/socs/blob/master/tests/README.rst

Contributing
------------
For guidelines on how to contribute to OCS see `CONTRIBUTING.rst`_.

.. _CONTRIBUTING.rst: CONTRIBUTING.rst
.. _CONTRIBUTING.rst: https://github.com/simonsobs/socs/blob/master/CONTRIBUTING.rst

License
--------
This project is licensed under the BSD 2-Clause License - see the
`LICENSE.txt`_ file for details.

.. _LICENSE.txt: LICENSE.txt
.. _LICENSE.txt: https://github.com/simonsobs/socs/blob/master/LICENSE.txt
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"versioneer-518",
]
build-backend = "setuptools.build_meta"
14 changes: 3 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
sphinx-argparse
numpy
autobahn[serialization]
twisted
ocs
mysql-connector>=2.1.6

# Lakeshore240
pyserial

mysql-connector>=2.1.6

# LabJack Agent
pymodbus
numexpr
Expand All @@ -25,8 +21,4 @@ sqlalchemy
# see docs/requirements.txt

# testing
pytest
pytest-cov
pytest-docker-compose
pytest-dependency
pytest-order
-r requirements/testing.txt
5 changes: 5 additions & 0 deletions requirements/testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest
pytest-cov
pytest-docker-compose
pytest-dependency
pytest-order
28 changes: 27 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,35 @@

import versioneer

with open("README.rst", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(name = 'socs',
long_description=long_description,
long_description_content_type="text/x-rst",
version = versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description = 'Simons Observatory Control System',
package_dir = {'socs': 'socs'},
packages = find_packages())
packages = find_packages(),
url="https://github.com/simonsobs/socs",
project_urls={
"Source Code": "https://github.com/simonsobs/ocs",
"Documentation": "https://ocs.readthedocs.io/",
"Bug Tracker": "https://github.com/simonsobs/ocs/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"Framework :: Twisted",
],
python_requires=">=3.6",
install_requires=[
'ocs',
'pyserial',
'sqlalchemy',
'pysnmp',
],
)

0 comments on commit 608ac6d

Please sign in to comment.